上一页 1 ··· 8 9 10 11 12
摘要: IndexOf()查找字串中指定字符或字串首次出现的位置,返首索引值,如:str1.IndexOf("字"); //查找“字”在str1中的索引值(位置)str1.IndexOf("字串");//查找“字串”的第一个字符在str1中的索引值(位置)str1.IndexOf("字",start,end);//从str1第start+1个字符起,查找end个字符,查找“字”在字符串STR1中的位置[从第一个字符算起]注意:start+end不能大于str1的长度indexof参数为string,在字符串中寻找参数字符串第一次出现的位置并返 阅读全文
posted @ 2014-03-11 11:58 苦力劳动者 阅读(275) 评论(0) 推荐(0) 编辑
摘要: C#编程命名规范类classPascal方法functionPascal接口interfacePascal总是以 I 前缀开始,后接Pascal命名枚举类型enumPascal委托delegatePascal 具体如下:用camel规则来命名局部变量和方法的参数,用pascal规则来命名方法和类型。publicclassTextBox{publicvoidDataBind(){}}stringuserName;publicAddUser(stringuserId,byte[] password);接口的名称加前缀 I.interfaceICompare{intCompare();}自定义的属性 阅读全文
posted @ 2014-03-06 15:46 苦力劳动者 阅读(1257) 评论(0) 推荐(0) 编辑
摘要: using System;namespace ParamsProgram{ class TestParams { public static void Main(string[] args)//static void Main(string[] args) { int m ;//= 10; int[] arr = new int[80]; for (int i = 0; i < arr.Length; i++) { arr[i] = i; ... 阅读全文
posted @ 2014-03-06 09:48 苦力劳动者 阅读(274) 评论(0) 推荐(0) 编辑
上一页 1 ··· 8 9 10 11 12