- 博客(8)
- 资源 (1)
- 收藏
- 关注
原创 Parallel's foreach method
1. The simple example of Parallel's foreach method: public static int ParallelTestMethod1() { int[] testIntAry = { 2, 5, 6, 7, 8, 9 }; int sum = 0;
2012-03-06 23:01:41 317
转载 Uses serialization to make a deep copy
private static Object DeepClone(Object original) { // Construct a temporary memory stream using (MemoryStream stream = new MemoryStream()) {
2012-03-04 22:53:05 191
转载 How to disable network?
How to disable network? var wmiQuery = new SelectQuery("SELECT * FROM Win32_NetworkAdapter " + "WHERE NetConnectionId != null " + "AND Manufacturer != 'Mic
2012-02-29 00:08:56 491
原创 C#-value type array allocated on managed Heap.
Value type array allocate 1. Define local variable as value type array(e.g. int[] testAry = new int[100]), CLR creates it as following: 1. Create a variable testAry on Stack. 2. Allocated mem
2012-02-24 00:29:59 313
原创 CLR call Virtual Methods
CLR via C# has following rules: The callvirt IL instruction can be used to call instance and virtual methods, not static methods. When the callvirt instruction is used to call an instance or virtual
2012-02-06 23:17:12 342
原创 System.TypeLoadException Error Analyze
System.TypeLoadException 是因为未能从指定程序集中加载类型, 一般是可能由以下几种情况导致: 1. 当公共语言运行库无法找到程序集内的类型或者无法加载类型时引发。一般是程序集内无该类型的定义或者类型的命名空间变了。 2. 程序集内确实有该类型,但是在程序集之间相互引用时由于某些原因,导致该类型不被包括在原本的程序集内。例如,A程序集引用B程序集,但是A标记为 [ass
2011-12-15 23:53:54 1086
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人