上一页 1 ··· 4 5 6 7 8 9 10 11 下一页
  2017年11月8日
摘要: 1.String类的IndexOf()方法返回的类型是?(选择2项) BC A.Int16 B.Int32 C.int D.long 2.下列关于变量定义正确的是:C A. float f = 3.14; B. bool b = “false”; C. decimal d = 12.30M; D. 阅读全文
posted @ 2017-11-08 15:35 段了的弦 阅读(367) 评论(0) 推荐(0) 编辑
  2017年11月5日
摘要: public/private/protectd -三种修饰符号 public static void a() { console.writeline(""); } --无参数,无返回值 public static string a() { return "b" } --无参数,有返回值 public 阅读全文
posted @ 2017-11-05 16:20 段了的弦 阅读(163) 评论(0) 推荐(0) 编辑
  2017年11月4日
摘要: 哈希表- 不规定长度,不规定类型,不规定键的类型 Hashtable ht = new Hashtable(); ht['a'] = 1; ht[0] = "b"; ht["b"] = 'c'; ht[1] = "d"; //ht.Add(1, "d"); ht[1] = "x"; foreach 阅读全文
posted @ 2017-11-04 10:27 段了的弦 阅读(297) 评论(0) 推荐(0) 编辑
  2017年11月3日
摘要: 数组- 控制长度,控制类型 int[] a=new int[5]{}; int[] a=new int[]{1,2,3,4,5}; a[0]="abc"; 集合- 不控制长度,不控制类型 arraylist a =new arraylist(); a.add(); a.remove(); a.rem 阅读全文
posted @ 2017-11-03 16:44 段了的弦 阅读(2706) 评论(0) 推荐(0) 编辑
  2017年11月2日
摘要: string str = "qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM1234567890"; Random ran = new Random(); int r = ran.Next(0, str.Length); string a = 阅读全文
posted @ 2017-11-02 15:44 段了的弦 阅读(956) 评论(0) 推荐(0) 编辑
摘要: 要判断时间合不合格,闰不闰年啊,然后还有Timespan 类型 -- Console.Write("请输入年:"); int n = int.Parse(Console.ReadLine()); Console.Write("请输入月:"); int y = int.Parse(Console.Re 阅读全文
posted @ 2017-11-02 15:40 段了的弦 阅读(911) 评论(0) 推荐(0) 编辑
摘要: 突然发现之前做闰年那题的时候有一个错误,就是 (n % 4 == 0 && n % 100 != 0) || n % 400 == 0 这是闰年, 当时做的是非闰年就无非是把不等改为等,等改为不等,像这样 (n % 4 != 0 && n % 100 == 0) || n % 400 != 0 其实 阅读全文
posted @ 2017-11-02 15:30 段了的弦 阅读(148) 评论(0) 推荐(0) 编辑
  2017年11月1日
摘要: C# 中的与JS中的基本一样的; Datetime da=datetime.now; --获取当前时间 Datetime da=new datetime(2000,10,10) --创建新的时间 da,tostring("yyyy年MM月dd日") --设置日期格式 yyyy-年 MM-月 dd-日 阅读全文
posted @ 2017-11-01 11:23 段了的弦 阅读(200) 评论(0) 推荐(0) 编辑
  2017年10月31日
摘要: 这个函数与if性质是一样的,但有些小地方不同 try { --相当于if } catch{ --如果出现错误才会执行catch } finally{ --必会执行的语句,当然也可以不写 } do{ } while(); --先循环在判断的循环 阅读全文
posted @ 2017-10-31 15:16 段了的弦 阅读(148) 评论(0) 推荐(0) 编辑
  2017年10月30日
摘要: 类型 范围 大小 sbyte -128 到 127 有符号 8 位整数 byte 0到255 无符号 8 位整数 char U+0000 到 U+ffff 16 位 Unicode 字符 short -32,768 到 32,767 有符号 16 位整数 ushort 0 到 65,535 无符号  阅读全文
posted @ 2017-10-30 16:05 段了的弦 阅读(6164) 评论(0) 推荐(1) 编辑
上一页 1 ··· 4 5 6 7 8 9 10 11 下一页