C# 跟进文件流分析文件后缀
摘要:using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using Syste
阅读全文
posted @
2020-03-17 17:34
西湖浪子
阅读(494)
推荐(0)
Framework4 task
摘要:创建和执行任务 Task 可以多种方式创建实例。 最常用的方法,它位于开头 .NET Framework 4.5, ,是调用静态 Run 方法。 Run 方法提供了简单的方法来启动任务使用默认值,并且无需额外的参数。 下面的示例使用 Run(Action) 方法来启动循环,然后显示循环迭代数的任务︰
阅读全文
posted @
2017-08-15 14:02
西湖浪子
阅读(345)
推荐(0)
c# Rsa xml pem 校验
摘要:using System;using System.Collections.Generic;using System.IO;using System.Linq;using System.Security.Cryptography;using System.Text; namespace test{
阅读全文
posted @
2017-05-02 11:24
西湖浪子
阅读(1283)
推荐(0)
RSA Pem转XML
摘要:http://blog.csdn.net/jiayanhui2877/article/details/47187077
阅读全文
posted @
2017-04-26 15:28
西湖浪子
阅读(663)
推荐(0)
nopi 2003 2007
摘要:https://github.com/tonyqus/npoihttp://npoi.codeplex.com/releasesThis project is the .NET version of POI Java project. With NPOI, you can read/write Of...
阅读全文
posted @
2015-10-22 19:11
西湖浪子
阅读(129)
推荐(0)
线程安全的单例模式
摘要:using System.Net;using Enyim.Caching;using Enyim.Caching.Configuration;using Enyim.Caching.Memcached;namespace OCS.Memcached{ public sealed class M...
阅读全文
posted @
2015-10-10 10:39
西湖浪子
阅读(194)
推荐(0)
Cache缓存的遍历与清除所有缓存
摘要:遍历缓存数据 //取得Cache的枚举 IDictionaryEnumerator CacheEnum = Cache.GetEnumerator(); while (CacheEnum.MoveNext()) { //缓...
阅读全文
posted @
2015-08-03 12:22
西湖浪子
阅读(3832)
推荐(0)
5个很好用的.net 分析工具
摘要:编者按】作者 Senthil Kumar曾在自家的网站. NET试验过不少分析工具,下面这些是他试用之后的收集:1. 网站内App的性能和内存分析器JetBrains dotTrace来自JetBrain,是针对网站内App的性能和内存分析器,能有效剖析目标应用的性能,很快找到NET1.0到4.5版...
阅读全文
posted @
2015-06-14 23:24
西湖浪子
阅读(370)
推荐(0)
Xml CDATA 序列化
摘要:namespace Test{ using System; using System.IO; using System.Text; using System.Xml; using System.Xml.Serialization; using Test.Share...
阅读全文
posted @
2015-05-15 19:13
西湖浪子
阅读(519)
推荐(0)
泛型数据类型转换方法
摘要:protected T ConvertObject(object obj) { T _result = default(T); if (obj != null) { _result = ...
阅读全文
posted @
2015-03-29 20:33
西湖浪子
阅读(475)
推荐(0)
读取大文件
摘要:private void ReadStreamFromFile() { string filePath = @"D:\abc.txt"; int bufferSize = 1024000; //每次读取的字节数 ...
阅读全文
posted @
2014-04-18 16:51
西湖浪子
阅读(184)
推荐(0)
使用DotNetZip压缩与解压缩
摘要:下载地址:http://dotnetzip.codeplex.com/解压后找到\\DotNetZipLib-DevKit-v1.9\zip-v1.9\Release下的Ionic.Zip.dll文件拷贝到C盘下接着打开Visual Studio Command Prompt (2010),然后定位...
阅读全文
posted @
2014-04-15 11:00
西湖浪子
阅读(1046)
推荐(0)
清除项目编译文件批处理
摘要::: Clean output foldersfor /D /R %%i in (bin*) do (rd /s /q "%%i")for /D /R %%i in (obj*) do (rd /s /q "%%i")for /D /R %%i in (debug*) do (rd /s /q "%%i")for /D /R %%i in (release*) do (rd /s /q "%%i")::for /R %%i in (*.scc) do (del /q "%%i")::for /R
阅读全文
posted @
2014-03-31 21:21
西湖浪子
阅读(176)
推荐(0)
Orm
摘要:Entity FrameworkPetaPocoOrmLiteDepper
阅读全文
posted @
2014-01-16 15:33
西湖浪子
阅读(129)
推荐(0)
Better ListView alternative - .NET control for WinForms
摘要:http://www.componentowl.com/Better ListView alternative - .NET control for WinFormsThe number one replacement component for the regular .NET ListView control.We’ve rewritten the .NET ListView control. Great look and feel, more features, better behavior. No learning needed.http://www.componentowl.com
阅读全文
posted @
2014-01-03 13:25
西湖浪子
阅读(409)
推荐(0)
C# Lambda表达式
摘要:FuncList.FindAll(pNodes => pNodes.ParentID == "01")等价于 if(pNodes.ParentID == "01") return pNodes;实际就是一个委托函数的缩写。总结一下:“Lambda 表达式”是一个匿名函数,它可以包含表达式和语句,并且可用于创建委托或表达式目录树类型。 所有 Lambda 表达式都使用 Lambda 运算符 =>,该运算符读为“goes to”。该 Lambda 运算符的左边是输入参数(如果有),右边包含表达式或语句块。Lambda 表达式 x => x
阅读全文
posted @
2013-11-01 04:21
西湖浪子
阅读(186)
推荐(0)
读取XLS
摘要:读取xls\xlsx格式的Excel /// ///读取xls\xlsx格式的Excel文件的方法 /// ///待读取Excel的全路径 /// private DataTable ReadExcelToTable(string path) { //连接字符串 string connstring = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" + path + ";Extended Proper...
阅读全文
posted @
2013-09-25 16:35
西湖浪子
阅读(178)
推荐(0)
快速POST代码,异常截获机制
摘要:System.Net.HttpWebRequest request = System.Net.HttpWebRequest.Create("httpxxxxxxxxxxxxxxxxxxxx") as System.Net.HttpWebRequest; request.Method = "POST"; request.ContentType = "application/x-www-form-urlencoded"; request.Timeout = 3000; string datastr = "xxxxxxxxxxxx
阅读全文
posted @
2013-08-08 13:04
西湖浪子
阅读(224)
推荐(0)
XML extensibility, xsi:type, XmlSerializer and configuration (or how to leverage XmlSerializer + OO extensibility)
摘要:Note: this entry has moved.Consider the following XML: Daniel CazzulinoWe can use the XmlSerializer to reconstruct an instance of the following class from it:public class Person{ public string FirstName { get { return _first; } set { _first = value; } } string _first; public string LastName { get {
阅读全文
posted @
2013-08-07 13:34
西湖浪子
阅读(335)
推荐(0)