随笔分类 -  c# 学习代码笔记

摘要:class Program { public static void Main(string[] args) { string[] urls = new string[]{ "http://wwww.baidu.coms", "http://w... 阅读全文
posted @ 2019-01-02 11:31 我是外婆 阅读(449) 评论(0) 推荐(0)
摘要:1 class Program 2 { 3 static BlockingCollection cols = new BlockingCollection(2); //设置阻塞队列最大的容量; 4 public static void Main(string[] args) 5 { 6 7 ... 阅读全文
posted @ 2018-12-29 11:22 我是外婆 阅读(1495) 评论(0) 推荐(0)
摘要:namespace console_class_继承 { class Program { public static void Main(string[] args) { Dog d = new Dog(); d.run(); ... 阅读全文
posted @ 2018-12-28 09:52 我是外婆 阅读(431) 评论(0) 推荐(0)
摘要://支持七个 构造函数,可迭代,支持索引器设置访问值 BitArray b = new BitArray(8); //初始化八个bit位 最多32位? //看下默认值,默认值为bool型 foreach (bool t in b) { Console.WriteLine(t); //全部为fa... 阅读全文
posted @ 2017-12-15 10:23 我是外婆 阅读(1850) 评论(0) 推荐(0)
摘要:class Program { public static void Main(string[] args) { test t = new test(); test.Test(t); Console.WriteLine(t.Name); Console.Read... 阅读全文
posted @ 2017-12-04 11:07 我是外婆 阅读(230) 评论(0) 推荐(0)
摘要:class mysqlEasyHeper{ private string _conStr = "server=localhost; user id=root; port=3308; password=root; charset=utf8; pooling=true"; private MySqlConnection _con; public string conState... 阅读全文
posted @ 2017-11-28 17:58 我是外婆 阅读(161) 评论(0) 推荐(0)
摘要:namespace console_父类子类 { class Program { public static void Main(string[] args) { showTest t = new showTest(); // 情况1 默认情况下调用父类的方法 t.show(n... 阅读全文
posted @ 2017-11-23 10:44 我是外婆 阅读(1559) 评论(0) 推荐(0)
摘要:1 public static void CreateConfig(){ 2 //c#可以添加内置的app.config,我们通过ConfigrationManager类可以 3 //可以很轻松的操作相关节点,操作的方式,这里不做多介绍, 4 //引发的问题 当程序编译的时候会自动生成 程序名.config.exe这样格式的文件 5 ... 阅读全文
posted @ 2017-11-21 11:12 我是外婆 阅读(675) 评论(0) 推荐(0)