摘要: 声明:一维type[] arrayName; 二维type[,] arrayName 其中type 为类型 arrayName数组名。string str=new string[5];struct 结构类型double d=double.Parse(System.Console.ReadLine());C# 支持两种类型:“值类型”和“引用类型”。 值类型(Value Type)(如 char、int 和 float)、枚举类型和结构类型。 引用类型(Reference Type) 包括类 (Class) 类型、接口类型、委托类型和数组类型。如何来划分它们? 以它们在计算机内存中如何分配来划分 阅读全文
posted @ 2013-09-04 17:42 秋水惜朝 阅读(260) 评论(0) 推荐(0) 编辑
摘要: 1.比较字符串a.CompareTo("b");a.Equals(“b”);2.定位字符串a.IndexOf("b");3.格式化字符串String.Format(String,Object);string a=String.Format(“(C) Currency:{0:C}\n”,-123.45678f);(C) Currency:¥=123.464.截取字符串string str="Hello Word!"string str1=str.Substring(0,5);5.分裂字符串string str=“Hello.Word!” 阅读全文
posted @ 2013-09-04 16:57 秋水惜朝 阅读(288) 评论(0) 推荐(0) 编辑
摘要: protected void btnPassWord_Click(object sender, EventArgs e) { //加密 Configuration config = WebConfigurationManager.OpenWebConfiguration(Request.ApplicationPath); ConfigurationSection section = config.GetSection("appSetting"); if (section != null && !section.SectionInf... 阅读全文
posted @ 2013-09-04 16:25 秋水惜朝 阅读(335) 评论(0) 推荐(0) 编辑
摘要: protected void btnUp_Click(object sender, EventArgs e) { Boolean fileOK = false; String path = Server.MapPath("~/UploadedImages/"); if (fileUpLoad.HasFile) { String fileExtension = System.IO.Path.GetExtension(fil... 阅读全文
posted @ 2013-09-04 16:01 秋水惜朝 阅读(587) 评论(0) 推荐(0) 编辑