摘要:
命名空间:System.Diagnostics; namespace System.Diagnostics { // 提供一组方法和属性,可用于准确地测量运行时间。 public class Stopwatch { // 获取以每秒计时周期数表示的计时器频率。此字段为只读。 public stati 阅读全文
posted @ 2020-09-22 16:29
技术不够脸来凑
阅读(1053)
评论(0)
推荐(0)
摘要:
1 class Program 2 { 3 static void Main(string[] args) 4 { 5 //显示实现接口就是为了解决方法的重名问题 6 IFlyable fly = new Bird(); 7 fly.Fly(); 8 Bird bird = new Bird(); 阅读全文
posted @ 2020-09-22 13:47
技术不够脸来凑
阅读(101)
评论(0)
推荐(0)
摘要:
1 class Program 2 { 3 static void Main(string[] args) 4 { 5 } 6 } 7 8 public class Person 9 { 10 private string _name; 11 12 public string Name 13 { 1 阅读全文
posted @ 2020-09-22 13:37
技术不够脸来凑
阅读(134)
评论(0)
推荐(0)
摘要:
1 class Program 2 { 3 static void Main(string[] args) 4 { 5 //接口就是一个规范、能力。 6 } 7 } 8 9 public class Person 10 { 11 public void CHLSS() 12 { 13 Console 阅读全文
posted @ 2020-09-22 13:34
技术不够脸来凑
阅读(69)
评论(0)
推荐(0)
摘要:
1 class Program 2 { 3 static void Main(string[] args) 4 { 5 Person p = new Person(); 6 Console.WriteLine(p.ToString()); 7 Console.ReadKey(); 8 } 9 } 1 阅读全文
posted @ 2020-09-22 13:32
技术不够脸来凑
阅读(145)
评论(0)
推荐(0)
摘要:
1 class Program 2 { 3 static void Main(string[] args) 4 { 5 //要将p这个对象 传输给对方电脑 6 //Person p = new Person(); 7 //p.Name = "张三"; 8 //p.Age = 19; 9 //p.Ge 阅读全文
posted @ 2020-09-22 13:28
技术不够脸来凑
阅读(172)
评论(0)
推荐(0)
摘要:
1 class Program 2 { 3 static void Main(string[] args) 4 { 5 //值类型:int double char decimal bool enum struct 6 //引用类型:string 数组 自定义类 集合 object 接口 7 8 // 阅读全文
posted @ 2020-09-22 13:24
技术不够脸来凑
阅读(131)
评论(0)
推荐(0)
摘要:
1 class Program 2 { 3 static void Main(string[] args) 4 { 5 Console.WriteLine("请输入您想要的笔记本品牌"); 6 string brand = Console.ReadLine(); 7 NoteBook nb = Ge 阅读全文
posted @ 2020-09-22 11:36
技术不够脸来凑
阅读(113)
评论(0)
推荐(0)
摘要:
1 class Program 2 { 3 static void Main(string[] args) 4 { 5 /* 用多态来实现 将 移动硬盘或者U盘或者MP3插到电脑上进行读写数据 */ 6 //MobileDisk md = new MobileDisk(); 7 //UDisk u 阅读全文
posted @ 2020-09-22 11:18
技术不够脸来凑
阅读(143)
评论(0)
推荐(0)
摘要:
学习: 1 class Program 2 { 3 static void Main(string[] args) 4 { 5 //狗狗会叫 猫咪会叫 6 Animal a = new Cat();//new Dog(); 7 a.Bark(); 8 9 Console.ReadKey(); 10 阅读全文
posted @ 2020-09-22 11:05
技术不够脸来凑
阅读(102)
评论(0)
推荐(0)
摘要:
1 class Program 2 { 3 static void Main(string[] args) 4 { 5 //概念:让一个对象能够表现出多种的状态(类型) 6 //实现多态的3种手段:1、虚方法 2、抽象类 3、接口 7 8 Chinese cn1 = new Chinese("韩梅梅 阅读全文
posted @ 2020-09-22 10:39
技术不够脸来凑
阅读(123)
评论(0)
推荐(0)
摘要:
1 class Program 2 { 3 static void Main(string[] args) 4 { 5 //使用StreamReader来读取一个文本文件 6 //using (StreamReader sr = new StreamReader(@"C:\Users\SpringR 阅读全文
posted @ 2020-09-22 10:33
技术不够脸来凑
阅读(143)
评论(0)
推荐(0)
摘要:
1 class Program 2 { 3 static void Main(string[] args) 4 { 5 //使用FileStream来读取数据 6 FileStream fsRead = new FileStream(@"C:\Users\SpringRain\Desktop\new 阅读全文
posted @ 2020-09-22 10:32
技术不够脸来凑
阅读(126)
评论(0)
推荐(0)
摘要:
1 class Program 2 { 3 static void Main(string[] args) 4 { 5 //将一个数组中的奇数放到一个集合中,再将偶数放到另一个集合中 6 //最终将两个集合合并为一个集合,并且奇数显示在左边 偶数显示在右边。 7 //int[] nums = { 1 阅读全文
posted @ 2020-09-22 10:27
技术不够脸来凑
阅读(165)
评论(0)
推荐(0)
摘要:
1 class Program 2 { 3 static void Main(string[] args) 4 { 5 Dictionary<int, string> dic = new Dictionary<int, string>(); 6 dic.Add(1, "张三"); 7 dic.Add 阅读全文
posted @ 2020-09-22 10:26
技术不够脸来凑
阅读(175)
评论(0)
推荐(0)
摘要:
1 class Program 2 { 3 static void Main(string[] args) 4 { 5 //int n = 10; 6 //object o = n;//装箱 7 //int nn = (int)o;//拆箱 8 9 10 //ArrayList list = new 阅读全文
posted @ 2020-09-22 10:25
技术不够脸来凑
阅读(123)
评论(0)
推荐(0)
摘要:
1 class Program 2 { 3 static void Main(string[] args) 4 { 5 //创建泛型集合对象 6 List<int> list = new List<int>(); 7 list.Add(1); 8 list.Add(2); 9 list.Add(3) 阅读全文
posted @ 2020-09-22 10:23
技术不够脸来凑
阅读(302)
评论(0)
推荐(0)
摘要:
Path类学习: 1 static void Main(string[] args) 2 { 3 string str = @"C:\3000soft\Red Spider\Data\Message\老赵.wav"; 4 //获得文件名 5 Console.WriteLine(Path.GetFil 阅读全文
posted @ 2020-09-22 09:32
技术不够脸来凑
阅读(166)
评论(0)
推荐(0)
摘要:
1 class Program 2 { 3 static void Main(string[] args) 4 { 5 //var:根据值能够推断出来类型 6 //c#是一门强类型语言:在代码当中,必须对每一个变量的类型有一个明确的定义 7 var n = 15; 8 var n2 = "张三"; 阅读全文
posted @ 2020-09-22 09:01
技术不够脸来凑
阅读(325)
评论(0)
推荐(0)

浙公网安备 33010602011771号