966bba02bb
Former-commit-id: bb0468d0f257ff100aa895eb5fe583fb5dfbf900
30 lines
384 B
C#
30 lines
384 B
C#
using System;
|
|
|
|
class MainClass
|
|
{
|
|
public static void Main()
|
|
{
|
|
Child test = new Child();
|
|
}
|
|
}
|
|
|
|
class Parent
|
|
{
|
|
protected virtual string Property { get; }
|
|
}
|
|
|
|
class Child : Parent
|
|
{
|
|
protected override string Property { get; }
|
|
|
|
public Child ()
|
|
{
|
|
new AnotherClass{ field = Property = "success" };
|
|
Console.WriteLine(Property);
|
|
}
|
|
}
|
|
|
|
class AnotherClass
|
|
{
|
|
public string field;
|
|
} |