Is it possible to print the class name from within a static function?
e.g ...
public class foo { static void printName() { // Print the
While the StackTrace answers are correct, they do have an overhead. If you simply want safety against changing the name, consider typeof(foo).Name. Since static methods can't be virtual, this should usually be fine.
typeof(foo).Name