Browse by Tags

Tagged Content List
  • Blog Post: String interning and String.Empty

    Here's a curious program fragment: object obj = "Int32"; string str1 = "Int32"; string str2 = typeof(int).Name; Console.WriteLine(obj == str1); // true Console.WriteLine(str1 == str2); // true Console.WriteLine(obj == str2); // false !? Surely if A equals B, and B equals C, then A equals C; that...
  • Blog Post: Double Your Dispatch, Double Your Fun

    Here’s an interesting question I got the other day: If you have an overloaded operator == then any call to the operator method is “early bound” at compile time according to the compile-time types of the operands . But calling Equals() on an object is a virtual call; the actual method called...
Page 1 of 1 (2 items)