a575963da9
Former-commit-id: da6be194a6b1221998fc28233f2503bd61dd9d14
41 lines
492 B
C#
41 lines
492 B
C#
using System;
|
|
|
|
class First
|
|
{
|
|
public virtual object this [string name]
|
|
{
|
|
get { return "First"; }
|
|
set { }
|
|
}
|
|
}
|
|
|
|
class Second : First
|
|
{
|
|
public override object this [string name]
|
|
{
|
|
get { return "Second"; }
|
|
set { }
|
|
}
|
|
}
|
|
|
|
class Third : Second
|
|
{
|
|
public override object this [string name]
|
|
{
|
|
get { return base [name]; }
|
|
set { }
|
|
}
|
|
}
|
|
|
|
class a
|
|
{
|
|
public static int Main (string[] args)
|
|
{
|
|
First t = (First)new Third ();
|
|
if (t ["test"] != "Second")
|
|
return 1;
|
|
|
|
return 0;
|
|
}
|
|
}
|