Is it possible to get a Type reference to the currently executing type from
a Static method?
public class foo
{
public string static FooM()
{
Type x = ????
return "Crap";
}
}
public class foo2
{
public string Something() { return "x"; }
}
then if calling Foo2.Foom() is it possible to figure out that the current
type is FooM?
+++ Rick ---

Signature
Rick Strahl
West Wind Technologies
http://www.west-wind.com/
http://www.west-wind.com/weblog/
----------------------------------
Making waves on the Web
Jon Skeet [C# MVP] - 19 Feb 2004 09:07 GMT
> Is it possible to get a Type reference to the currently executing type from
> a Static method?
[quoted text clipped - 14 lines]
> then if calling Foo2.Foom() is it possible to figure out that the current
> type is FooM?
No, because it's not. A call to Foo2.Foom() will actually be compiled
to Foo.Foom().

Signature
Jon Skeet - <skeet@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too