Consider the following code:
public class foo() {
public foo() {
ContentManager.DoStuff<foo>();
}
}
Rather than passing in <foo>
as the generic type, is there a way to programmatically determine the current class and pass in that? I tried ContentManager.DoStuff<typeof(this)>()
, but that obviously doesn't work.
Is there a way?