随笔分类 -  C#

C#中Array与ArrayList用法及转换
摘要:一,C# array数组的用法范例: type[] typename=new type[size]; 如int[] a=new int[2];string[] str=new string[5];实事上我们平常是用int[],string[]...的,此时我们已经创建一个Array数组,只不过我们平常没有这种意识而已.(1):type数据类型不能缺;且要统一,而不能是如 int[] a=new... 阅读全文
posted @ 2010-08-18 19:33 不远道人 阅读(38273) 评论(0) 推荐(1)
C#中Split用法~
摘要:1、用字符串分隔:usingSystem.Text.RegularExpressions;stringstr="aaajsbbbjsccc";string[]sArray=Regex.Split(str,"js",RegexOptions.IgnoreCase);foreach(stringiinsArray)Response.Write(i.ToString()+"<br>");输出... 阅读全文
posted @ 2010-08-18 19:31 不远道人 阅读(269864) 评论(13) 推荐(22)
C# 2.0中的可空类型以及?和??
摘要:最近在学习C# 2.0,在.NET Framework 2.0中新增加了System.Nullable泛型结构,它具有处理值类型数据具和处理null的功能。例如:Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--System.Nullable<in... 阅读全文
posted @ 2010-08-03 21:26 不远道人 阅读(395) 评论(0) 推荐(0)