C#?й??????????????????÷?
???????????? ???????[ 2013/8/15 10:42:35 ] ????????
C#?й??????????????????÷?
????????????????????????????
?????????C????????????C#??????????????????????????C#??????????????????????鸚???????????????????????е?????????????????????????????????????????鰱???????????????????????“????”???????“??????”???λ?????????????????????????????ú?????????????
??????????飬?????????????????????????????б?????????????????????????????????????????????????????????????????????????C#????????????????????????????????????????????????????????У???????????????????????С???????????????????????????С?????????????????????????????С???????????????????????????????????
????????????????C#?е?????
?????????????????????????????????????ó????????????С???????????????????????ù???????????????????????????????????????????????з?????????????????????void????????????????з??????????????????????????????????????????????????????κ????????????? ???????е???????????????????????????????????д?????????????????????????????????
????class TestClass { ??public TestClass(): base() {} // ??CLR?? }
?????????о????????????????
????1??????????
????class TestClass { ??public TestClass(): base() {} }
??????????????????????CLR??????
????2???????????
?????????????????????????????г???????????????磺
using System; class Point { ??public double x?? y; ??public Point() ??{ ????this.x = 0; ????this.y = 0; ??}
public Point(double x?? double y) ??{ ????this.x = x; ????this.y = y; ??} ??… }
class Test { ??static void Main() ??{ ????Point a = new Point(); ????Point b = new Point(3?? 4); // ?ù????????????????… ??} }
???????????????Point???????????????????????????????????????в?????Point???????????????????double??????Point??????????????????????Щ?????????????CLR?????????????????????????????????????????????????Point()??Point(double x?? double y)???????????????????????????????
3?? ?????????
??????????????????????????г???????????????????????????????????????????????????в??????????????η????????????????????????????????????????????á??磺
????using System.Data; class Employee { ??private static DataSet ds; ??static Employee() ??{ ????ds = new DataSet(...); ??} ??... }
??????????????о????????????Employee???????????????????????????г?????????????????????????г??????????????????????????????????????????????????????????г??????
?????????????????????????????????private?????????private TestClass() {…}??????private??ζ?????????治???????ù????????????????????????????ж????????????????????
?????????????????????????????????潫???????????????ν??У?????н??У??????????????????????÷??????????????????????????????????????????????????????????????????????????????????????????
??????????????????????????????????????????????????????????? ????????д??????????л??????????????????????????????????????????ж?????????????л???????????????г???????????????????????????????????
??????????л?????????????????????????л??????ι?????????????л?????вι???????????????????????????????????????????磺
class A { private int x; ??public A( ) { x = 0; } ??public A( int i ) { x = i; } };
class B : A { private int y; ??public B( ) { y = 0; } ??public B( int i ) { y = i; } ??public B( int i?? int j ):A(i) { y = j; } };
B b1 = new B();
//??л???A???????A()???????????????????B() B b2 = new B(1);
//??л???A???????A()???????????????????B(int) B b3 = new B(0??1);
//?????л???A???????A(int) ??????????????
??????????B(int??int)
??????????????????д??????????????????????????????A?????????ι?????public A( ) { x = 0; }????????????????й????????????????б??????????A???вι?????A(i)???????????
class A { private int x; ??public A( int i ) { x = i; } };
class B : A { private int y; ??public B():A(i) { y = 0; } ??public B(int i):A(i) { y = i; } ??public B(int i?? int j):A(i) { y = j; } };
??????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11