Thursday, September 24, 2009

Get Class name from Static method in C#.NET

In order to get class name from the static method I used the following code, using .NET reflection

String className = MethodBase.GetCurrentMethod().DeclaringType.Name;

No comments: