I create a Generic class as follows:
public class Sample<T> where T : class { public DoSomething(); }
then I create a new class:
public class Sample2 { Sample<Sample2> obj=new Sample<Sample2>(); }
Why can't I use the code below to instantiate the Sample class in the Sample2 class?
Sample<typeof<this>> obj=new Sample<typeof<this>>();
source share