Consider the following code:
abstract class Foo where T : Foo, new() { void Test() { if(Bar != null) Bar(th
You can cast 'this' to T:
Bar((T)this);
This however will fail if you have the following:
public class MyFoo : Foo { } public class MyOtherFoo : Foo { }
Because 'MyOtherFoo' is not an instance of 'MyFoo'. Take a look at this post by Eric Lippert, one of the designers of C#.