随笔分类 -  C#

摘要:1 class Program 2 { 3 static void Main(string[] args) 4 { 5 List<FileInfo> lst = new List<FileInfo>(); 6 string strPath = @"E:\aaa"; 7 List<FileInfo> lstFiles = getFile(strPath, ".aspx", lst); 8 forea 阅读全文
posted @ 2020-01-15 17:40 温故余学 阅读(1666) 评论(0) 推荐(0)
摘要://冒泡排序法 static void BubbleSort(int[] w) { int hang=w.Length ; int temp; for(int i=0;i w[j]) { ... 阅读全文
posted @ 2017-02-22 17:10 温故余学 阅读(391) 评论(0) 推荐(0)
摘要:int max=0; //初始化最大值,默认为0 int min=9; //初始化最小值,默认为9 int a=5; int b=7; int c=4; int d=9; int[] intArr={a,b,c,d}; foreach(int tempint in intArr) { if(maxtempint) {min=tempint;} } //for(int i=0;i... 阅读全文
posted @ 2017-02-21 09:11 温故余学 阅读(1920) 评论(0) 推荐(0)
摘要:1 Round(Decimal) 2 Round(Double) 3 Round(Decimal, Int32) 4 Round(Decimal, MidpointRounding) 5 Round(Double, Int32) 6 Round(Double, MidpointRounding) 7 Round(Decimal, Int32, MidpointRounding) 8 Round(... 阅读全文
posted @ 2016-03-23 14:18 温故余学 阅读(703) 评论(0) 推荐(0)
摘要:'文本框选中显示'TextBox1.SelectAll()选择所有文本'textBox1.Text.Insert(start,strInsertText)指定位置添加文本1 Private Sub TextBox1_MouseClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.MouseEventArgs) H... 阅读全文
posted @ 2016-03-17 09:20 温故余学 阅读(1513) 评论(0) 推荐(0)
摘要:1、运算符就是在实例化一个类的时候(运算符的用法) 2、new 约束指定泛型类声明中的任何类型参数都必须有公共无参数构造函数。当泛型类创建类型的新实例时,将此约束应用于类型参数 3、就是在子类中隐藏基类的成员(包括数据成员函数),可以省略,一般还是写上比较好这样让人更容易理解;对基类的成员访问可以用 阅读全文
posted @ 2016-03-16 10:28 温故余学 阅读(386) 评论(0) 推荐(0)
摘要:1 DateTime dt = DateTime.Now; //当前时间 2 3 DateTime startWeek = dt.AddDays(1 - Convert.ToInt32(dt.DayOfWeek.ToString("d"))); //本周周一 4 DateTime endWeek = startWeek.AddDays(6); //本周周日 5 ... 阅读全文
posted @ 2016-03-14 17:14 温故余学 阅读(4404) 评论(0) 推荐(0)