, MyClass. , , SomeProxy, , SomeClass.
, , , , . , , - :
class Proxy<T>
{
T Value { get; set; }
}
class MyClass<U> where U : Proxy<> { }
Proxy, U. U Proxy, Proxy, , , T, :
class MyClass<U> where U : Proxy<>
{
void SomeMethod(U parameter)
{
var local = parameter.Value;
}
}
, compiler local ? , , , , . - , -, U .
-, , . ( , type Proxy), . , CLR , . , , - , , , , .
, , , , , , , .