???C#??????????????????2??
???????????? ???????[ 2016/5/31 10:04:16 ] ??????????????????? C#
???????????????????????????????????????
1 using System;
2
3 namespace Test
4 {
5 class Program
6 {
7 static void Main(string[] args)
8 {
9 int height = 170;
10 int weight = 60;
11 People.Find();
12 People developer = new Developer()(height?? weight);
13 bool isHealthyWeight = developer.IsHealthyWeight();
14 bool isRich = developer.IsRich();
15 }
16 }
17
18 class People
19 {
20 int _height;
21 int _weight;
22
23 public People(int height?? int weight)
24 {
25 _height = height;
26 _weight = weight;
27 }
28
29 public virtual bool IsRich();
30
31 public bool IsHealthyWeight()
32 {
33 var healthyWeight = (Height - 80) * 0.7;
34 return Weight <= healthyWeight * 1.1 && Weight >= healthyWeight * 0.9;
35 }
36
37 public static string Find(string id) { return ""; }
38 }
39
40 class Developer : People
41 {
42 public Developer(int height?? int weight) : base(height?? weight)
43 { }
44
45 public override bool IsRich()
46 {
47 return false;
48 }
49 }
50
51 }
?????????ж??????????????????int??bool??string????Щ????mscorlib.dll??????system????????£??????????mscorlib.dll?????????int??bool??string??????????????????????????????Developer??People???????????????????????????????object???????????????????????double?????????????????????????????????涼?и???????????????????????е?????????????????
??????????????????????Find()??????????????????People????????????????????????????д?????????е????JIT?????е????????С?
????developer??????????????People???????????????Developer??????developer???????????????Developer????????????????????????????Σ????????????????????й??????????????????????????С?
?????麯???????????????????????Developer??????????Developer?????????IsRich???????????JIT???????С?
?????????????????C#????????й??????????????????????????????CLR via C#???飬С???????????£?лл?????
??????
???·???
??????????????????
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