随笔分类 -  C#

摘要:实现效果: 知识运用: c#中实现继承的语法格式:Class DerivedClass:BaseClass{ } 继承类时 ,必须在子类和基类之间使用冒号(:) 实现代码: 阅读全文

posted @ 2018-12-06 01:17 努力成长静待花开 阅读(364) 评论(0) 推荐(0)

摘要:实现效果: 知识运用: get和set访问器 [修饰符] [类型 ] [属性名]{ get {get访问器体}; set {set访问器体}; } 实现代码: 知识补充: 属性名首字母通常大写 在set访问器中不能自定义使用名称为value的局部变量或常量 在set访问器体中允许包含大量语句,因此可 阅读全文

posted @ 2018-12-05 00:07 努力成长静待花开 阅读(358) 评论(0) 推荐(0)

摘要:实现效果: 知识运用: System.Collections命名空间下的ArrayList集合类的Add()方法 使用了 DataGridView 控件 实现代码: 阅读全文

posted @ 2018-12-04 23:18 努力成长静待花开 阅读(528) 评论(0) 推荐(0)

摘要:实现效果: 知识运用: Array类的Sort方法 public static void Sort(Array array) // array:要排序的一维Array数组 实现代码: 知识补充: 对数组中的元素进行逆序排序:Array类的reverse()方法 两种重载: public static 阅读全文

posted @ 2018-12-04 21:54 努力成长静待花开 阅读(2135) 评论(0) 推荐(0)

摘要:实现效果: 实现原理: 实现代码: 阅读全文

posted @ 2018-12-04 13:18 努力成长静待花开 阅读(930) 评论(0) 推荐(0)

摘要:实现效果: 实现原理: 实现代码: 阅读全文

posted @ 2018-12-04 05:58 努力成长静待花开 阅读(3242) 评论(0) 推荐(0)

摘要:实现效果: 实现原理: 实现代码: 阅读全文

posted @ 2018-12-04 05:20 努力成长静待花开 阅读(1609) 评论(0) 推荐(0)

摘要:实现效果: 实现代码: 阅读全文

posted @ 2018-12-03 18:44 努力成长静待花开 阅读(5017) 评论(0) 推荐(0)

摘要:实现效果: 知识运用: Array对象的Length属性 int类的tryParse()方法 实现代码: 阅读全文

posted @ 2018-12-03 02:32 努力成长静待花开 阅读(2373) 评论(0) 推荐(0)

摘要:实现效果: 知识运用: Array类的FindAll()方法,根据指定条件在数组中检索元素 返回一个包含匹配项的数组 无匹配项则返回空数组 public static T[] FindAll<T>(T[]array,Predicate<T>match) array: 要搜索从零开始的的一维Array 阅读全文

posted @ 2018-12-02 23:15 努力成长静待花开 阅读(354) 评论(0) 推荐(0)

摘要:实现效果: 知识运用: 获取数组的行与列运用了Array类的GetUpperBound(int dimension)方法,用来获取指定维度的上限; 使用GetUpperBound(0)+1获取数组的行数,使用GetUpperBound(1)+1获取数组的列数; 实现代码: 阅读全文

posted @ 2018-12-02 21:20 努力成长静待花开 阅读(838) 评论(0) 推荐(0)

摘要:实现效果: 知识运用: 实现代码: 阅读全文

posted @ 2018-12-02 15:03 努力成长静待花开 阅读(819) 评论(0) 推荐(0)

摘要:实现效果: 知识运用:(下图中好像多了个'(' ) 实现代码: 阅读全文

posted @ 2018-12-02 12:17 努力成长静待花开 阅读(1579) 评论(0) 推荐(0)

摘要:实现效果: 知识运用: 实现代码: 阅读全文

posted @ 2018-12-01 23:17 努力成长静待花开 阅读(5282) 评论(0) 推荐(0)

摘要:实现效果: 知识运用: 实现代码: 阅读全文

posted @ 2018-12-01 21:33 努力成长静待花开 阅读(996) 评论(0) 推荐(0)

摘要:实现效果: 知识运用: 实现代码: 阅读全文

posted @ 2018-11-30 19:16 努力成长静待花开 阅读(2441) 评论(0) 推荐(0)

摘要:实现效果: 知识运用: Regex类的Split()方法:根据正则表达式模式对字符串进行拆分 public static string[] Split(string input,string pattern) //返回一个数组类型 input:要拆分的字符串 pattern:所匹配的正则表达式模式 阅读全文

posted @ 2018-11-30 18:57 努力成长静待花开 阅读(8676) 评论(0) 推荐(0)

摘要:实现效果: 知识运用: Regex类的Replace()方法:用于替换在指定字符串内匹配正则式的字符串为某字符串 public static string Replace(string input,string pattern,string replacement) input 要搜索匹配项的字符串 阅读全文

posted @ 2018-11-30 18:10 努力成长静待花开 阅读(7029) 评论(0) 推荐(0)

摘要:实现效果: 知识运用: 实现代码: 阅读全文

posted @ 2018-11-30 16:14 努力成长静待花开 阅读(3311) 评论(0) 推荐(0)

摘要:实现效果: 实现原理: 实现代码: 阅读全文

posted @ 2018-11-30 01:38 努力成长静待花开 阅读(2670) 评论(0) 推荐(0)