摘要:运行效果:代码: 1 using System; 2 using System.Collections.Generic; 3 using System.Linq; 4 using System.Text; 5 6 namespace InnerList 7 { 8 class Progra...
阅读全文
摘要:序列化与反序列化一个自定义的字段:运行效果:代码: 1 using System; 2 using System.Collections.Generic; 3 using System.Linq; 4 using System.Text; 5 6 //引入相应命名空间 7 using System...
阅读全文
摘要:代码: 1 using System; 2 using System.Collections.Generic; 3 using System.ComponentModel; 4 using System.Data; 5 using System.Drawing; 6 using System.Lin...
阅读全文
摘要:代码: 1 using System; 2 using System.Collections.Generic; 3 using System.Linq; 4 using System.Text; 5 using System.Threading.Tasks; 6 7 //引用相应命名...
阅读全文
摘要:运行效果:代码: 1 using System; 2 using System.Collections.Generic; 3 using System.ComponentModel; 4 using System.Data; 5 using System.Drawing; 6 using...
阅读全文
摘要:运行效果:项目结构图:DownLoad.cs文件代码: 1 using System; 2 using System.Collections.Generic; 3 using System.ComponentModel; 4 using System.Data; 5 using System.Dra...
阅读全文
摘要:1 using System; 2 using System.Collections.Generic; 3 using System.Linq; 4 using System.Text; 5 using System.Threading.Tasks; 6 7 //添加命名空间 8 using S...
阅读全文
摘要:1 using System; 2 using System.Collections.Generic; 3 using System.Linq; 4 using System.Text; 5 using System.Threading.Tasks; 6 7 //添加命名空间 8 using S...
阅读全文
摘要:地址:http://www.tracefact.net/CSharp-Programming/Delegates-and-Events-in-CSharp.aspx
阅读全文
摘要:签名指的是返回值和参数。比如 :public void A ( int p1,int p2){}public void B ( int q1,int q2){}的签名相同。而public int C (int m1,int m2){}则和方法A签名不同,因为C的返回值为int
阅读全文
摘要:转载自:http://www.cnblogs.com/kissdodog/archive/2013/02/21/2919886.html
阅读全文
摘要:转载自:http://blog.csdn.net/yexuanbaby/article/details/9029605
阅读全文
摘要:转载自:http://www.cnblogs.com/blueskybcl/archive/2010/06/03/1750421.html
阅读全文
摘要:1 #region 文件上传 2 private void UpLoadFile(string fileName, string fileNamePath, string uriString) 3 { 4 string NewFileName = DateTi...
阅读全文
摘要:代码: 1 static void Main(string[] args) 2 { 3 //在指定目录下创建指定的文件 4 File.Create(@"C:\Users\Administrator\Desktop\code.txt");...
阅读全文
摘要:代码: 1 static void Main(string[] args) 2 { 3 string strPath = @"C:\inetpub\custerr\zh-CN\KaiDi.txt"; 4 5 //获得文件的全路径 6 ...
阅读全文
摘要::向集合中添加10个元素,计算平均值,求最大、最小值。 1 double sum = 0; 2 list.AddRange(new int[] { 1, 2, 3, 4, 5, 6, 7, 8, 9 }); 3 int Max,...
阅读全文
摘要:list.Count//获取集合中实际元素的个数.list.Capacity//获取集合中可包含的元素数. /** * 每次集合中实际包含元素的个数(Count)超过了可以包含的元素的个数(Capacity)的时候,集合就会向内存中申请多开辟一倍的空间,来保证集合的长...
阅读全文
摘要:1 static void Main(string[] args) 2 { 3 //实例化出一个集合对象 4 ArrayList list = new ArrayList(); 5 6 /*添加*/ 7 ...
阅读全文
摘要:转载自:http://www.cnblogs.com/SkySoot/archive/2012/03/12/2391704.html运行效果:代码: 1 /// 2 /// 文件读写操作 3 /// 为简化代码供大家学习,暂不考虑捕捉异常 4 /// 5 public partial ...
阅读全文