????1.???????????
???????????????????????????????????????????????.NET??CLR???????????????????????????GC???LOH????????????????????????????????????????????????????GC??????????GC?????????????????????????????????????佫??????????????????Ч???????????????
????GC??????????С???????????????GC???????????????????LOH???????????????????????????????????GC?????????????????IL?п??????newobj??ldstr(????string????)??newarr(????????μ????????)??box(???)?????????????????
?????????????????????????????????????????????????洢????е?????????????????????????????????????????????????????????????????????????????????Person???Student????????Student s = new Student() { studentId = 2?? Id = 4 };??????s???????????????????????????????????????????????????s???????????????????????????????л???????
public class Person
{
public int Id;
public void Eat()
{
Console.WriteLine("Eat Pear");
}
}
public class Student:Person
{
public int studentId;
public void GotoSchool()
{
Console.WriteLine("Go to School");
}
}

????2.??????????????
??????????д?????????????????????????????????????????д??Person p=new Student();???????д???????????????????????????????????????????????????Person????????鷽???????????????Student??????д???????????п???????????????д???????鷽?????????????Person???????е?2??????????????????????????????????????????Student???????л??????new void Eat()???????????????????p?????????????new Eat()???????????????????????????p??????Person???????е???????????????????????Person???????????object?????????????????????????Student????????????????
????public  abstract class Person
????{
????public  int Id;
????public void Eat()
????{
????Console.WriteLine( "?????");
????}
????public virtual void Walk()
????{
????Console.WriteLine("?????");
????}
????//??????????????????????????????Person???abstract?????????????????????????????
????public abstract void Run();
????}
????public class Student:Person
????{
????public int studentId;
????public void GotoSchool()
????{
????Console.WriteLine("Go to School");
????}
????public new void Eat()
????{
????Console.WriteLine("???  ?????");
????}
????public override void Walk()
????{
????Console.WriteLine("???  ?????");
????}
????public override void Run()
????{
????Console.WriteLine("???  ?????");
????}
????}