摘要:
这次主要分享的内容是关于继承的知识。 首先,我们先来看看继承; 既然有继承,就要有父类和子类,来看下面的一段代码: class Person { private int nAge; protected string strName; double douHeight; public string s 阅读全文
摘要:
我们首先来看下面的一段代码: class Program { static void Main(string[] args) { Point p; Console.WriteLine(p); Point p1 = new Point(); Console.WriteLine(p1); Console 阅读全文
摘要:
一,C#中结构 在C#中可以使用struct关键字来定义一个结构,级别与类是一致的,写在命名空间下面。 1)结构中可以定义属性,字段,方法和构造函数。示例代码如下: //定义结构 struct Point { //定义字段 private int x; //封装字段 public int X { g 阅读全文
摘要:
一 委托 定义: A delegate is a type that represents references to methods with a particular parameter list and return type. When you instantiate a delegate, 阅读全文