随笔分类 - c#
摘要:using System; using System.IO;class ListAllFilesDemo{ public static void Main() { Console.Write( "请输入要查询的目录: "); string dir = Console.ReadLine(); try { ListFiles(new ...
阅读全文
摘要:1.静态成员和非静态成员的区别? 答:静态变量使用 static 修饰符进行声明,在类被实例化时创建,通过类进行访问不带有 static 修饰符声明的变量称做非静态变量,在对象被实例化时创建,通过对象进行访问一个类的所有实例的同一静态变量都是同一个值,同一个类的不同实例的同一非静态变量可以是不同的值静态函数的实现里不能使用非静态成员,如非静态变量、非静态函数等示例:结果:Class1's stat...
阅读全文
摘要://更改属性 this.listView1.GridLines = true; //显示表格线 this.listView1.View = View.Details;//显示表格细节 this.listView1.LabelEdit = true; //是否可编辑,ListView只可编辑第一列。 this.listView1.Scrollable = true;//有滚动条 this.listV...
阅读全文
摘要:1、方法一(不可逆加密)publicstringEncryptPassword(stringPasswordString,stringPasswordFormat){stringencryptPassword=null;if(PasswordFormat="SHA1"){encryptPassword=FormsAuthortication.HashPasswordForStoringInConf...
阅读全文
浙公网安备 33010602011771号