The lack of typeof is ambiguous:
class foo { public static string ToString() { return "Static"; } } public class Program { private static void Main(string[] args) { Console.WriteLine(foo.ToString()); Console.WriteLine(typeof(foo).ToString()); } }
foo and typeof(foo) not the same thing and force the compiler to pretend that this is a bad idea, even if we ignore this ambiguity.
Brian
source share