a575963da9
Former-commit-id: da6be194a6b1221998fc28233f2503bd61dd9d14
43 lines
456 B
C#
43 lines
456 B
C#
using System;
|
|
class Base
|
|
{
|
|
protected string H {
|
|
get {
|
|
return "Base.H";
|
|
}
|
|
}
|
|
}
|
|
|
|
// #1
|
|
class X {
|
|
class Derived : Base
|
|
{
|
|
public class Nested : Base
|
|
{
|
|
public void G() {
|
|
Derived[] d = new Derived[0];
|
|
Console.WriteLine(d[0].H);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
// #2
|
|
class Derived: Base
|
|
{
|
|
public class Nested : Base
|
|
{
|
|
public void G() {
|
|
Derived d = new Derived();
|
|
Console.WriteLine(d.H);
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
class Test
|
|
{
|
|
public static void Main()
|
|
{
|
|
}
|
|
} |