3 public abstract class Elem
{
4 public abstract Type getType
<T
> ();
7 public sealed class TextElem
: Elem
{
8 public override Type getType
<T
> () { return typeof (T); }
11 public class OtherTextElem
: Elem
{
12 public sealed override Type getType
<T
> () { return typeof (T); }
16 public static int Main () {
17 TextElem elem
= new TextElem ();
19 if (elem
.getType
<string> () != typeof (string))
22 OtherTextElem oelem
= new OtherTextElem ();
24 if (oelem
.getType
<string> () != typeof (string))