Why does 'unbox.any' not provide a helpful exception text the way 'castclass' does?
问题 To illustrate my question, consider these trivial examples (C#): object reference = new StringBuilder(); object box = 42; object unset = null; // CASE ONE: bad reference conversions (CIL instrcution 0x74 'castclass') try { string s = (string)reference; } catch (InvalidCastException ice) { Console.WriteLine(ice.Message); // Unable to cast object of type 'System.Text.StringBuilder' to type 'System.String'. } try { string s = (string)box; } catch (InvalidCastException ice) { Console.WriteLine