new public class MyClass // nested type hiding the base type members
{
public int x =
;
public int y;
public int z;
}
public static void Main()
{
// Creating object from the overlapping class:
MyClass S
= new MyClass();
// Creating object from the hidden class:
MyBaseC
MyClass S
= new MyBaseC
MyClass();
Console
WriteLine(S
x);
Console
WriteLine(S
x);
}
}
輸出
[] [] []
From:http://tw.wingwit.com/Article/program/net/201311/14880.html