Challenge: Please create an instance of the following class (using any type as T):
class Foo<T>
where T : Foo<T>
{
}
You may use any technique you like; plain "new MyClass...", using reflection, hacking MSIL, whatever.
static class Program {
static void Main() {
Foo<Bar> foo = new Foo<Bar>();
}
}
class Foo<T> where T : Foo<T> {}
class Bar : Foo<Bar> {}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With