Is it possible to print the class name from within a static function?
e.g ...
public class foo { static void printName() { // Print the
Since C# 6.0 there exists an even simpler and faster way to get a type name as a string without typing a string literal in your code, using the nameof keyword:
public class Foo { static void PrintName() { string className = nameof(Foo); ... } }