.NET: Determine the type of “this” class in its static method

Posted by Entrase on Stack Overflow See other posts from Stack Overflow or by Entrase
Published on 2010-01-17T16:14:22Z Indexed on 2010/05/26 3:41 UTC
Read the original article Hit count: 269

Filed under:
|
|
|

Well, in a non-static method I could use this.GetType() and it would return the Type. How can I get the same Type in a static method? Of course, I can't just write typeof(ThisTypeName) because ThisTypeName is known only in the runtime. Thanks!

© Stack Overflow or respective owner

Related posts about c#

Related posts about .NET