using System;
class Program
{
interface IObject<in A>
string typeOf();
}
class samlpe<A> : IObject<A>
string IObject<A>.typeOf()
return typeof(A).ToString();
class samlpeB<A> : IObject<A>
static void Main(string[] args)
IObject<object> _object = new samlpe<Object>();
IObject<string> _string = new samlpeB<String>();
_string = _object ;//可以轉換成子型別