c#基础三 常用数据类型的用法(字符串 数组 枚举)
摘要:
常用数据类型的用法:一:字符串所有计算的下标都是从零开始!创建:(1) string s1 = “this is a string”;(2) string s2 = new string(‘a’,4);//aaaa(3) string a = new string(new char[] { 'h', 'e', 'l', 'l', 'o' });//hello得到字符串中的某个字符: string myString = “some text”; char chFirst = myString[2];//序号从0开始, 阅读全文
posted @ 2012-02-28 00:41 +Hansen+ 阅读(1161) 评论(0) 推荐(1)
浙公网安备 33010602011771号