随笔分类 -  C#2.0

摘要:1 /* 2 IEnumerator 接口 3 支持对非泛型集合的简单迭代。 4 5 IEnumerator 是所有非泛型枚举数的基接口。 6 7 8 C# 语言的 foreach 语句(在 Visual Basic 中为 for each)隐藏了枚举数的复杂性。 9 10 枚举数可用于读取集合中的数据,但不能用于修改基础集合。 11 12... 阅读全文
posted @ 2018-11-10 10:02 冬夜的火 阅读(210) 评论(0) 推荐(0)
摘要:public class Person { public string firstName; public string lastName; public int age; public Person(string fName, string lName, int age) { t... 阅读全文
posted @ 2018-11-10 09:53 冬夜的火 阅读(198) 评论(0) 推荐(0)
摘要:1 /* 2 IEnumerator 接口 3 支持对非泛型集合的简单迭代。 4 5 IEnumerator 是所有非泛型枚举数的基接口。 6 7 8 C# 语言的 foreach 语句(在 Visual Basic 中为 for each)隐藏了枚举数的复杂性。 9 10 枚举数可用于读取集合中的数据,但不能用于修改基础集合。 11 12... 阅读全文
posted @ 2018-11-10 09:52 冬夜的火 阅读(141) 评论(0) 推荐(0)
摘要://public delegate void EventHandler(object sender, EventArgs e); public partial class Form1 : Form { //public event EventHandler Click; public Form1() { ... 阅读全文
posted @ 2018-11-10 09:49 冬夜的火 阅读(155) 评论(0) 推荐(0)
摘要:1 namespace DelegateDemo 2 { 3 delegate void HeaterDelegate(int t); 4 5 class Heater 6 { 7 private int temperature; 8 // 烧水 9 //给委托heaterDel加上... 阅读全文
posted @ 2018-11-10 09:22 冬夜的火 阅读(132) 评论(0) 推荐(0)
摘要:1 namespace CSharp2._0 2 { 3 public class Finder 4 { 5 //泛型方法 6 public static int Find(T[] items, T item) 7 { 8 for (int i = 0; i ss; 24 2... 阅读全文
posted @ 2018-11-10 08:50 冬夜的火 阅读(142) 评论(0) 推荐(0)