Char to int implicit cast Behind the Scenes
问题 The following is valid in c# as Char can be implicitly cast to int int i = 'a'; i am just curious about what .Net Framework do behind the scenes, i looked in to char and int types source code but unable to find where it's written. Can any body explain what happens behind the scene? 回答1: In C# we have something that is called a Single-Rooted unified type system . That means every existing type is a subtype of one root type. Object in C#. So char or int is only short (alias) for System.Char and