aliasing

How are type aliases resolved when the System directive is missing?

百般思念 提交于 2021-02-11 09:13:37
问题 bool , int ,and string (to name a few), are all aliases of System types. They can all be used without the System directive being included. Yet the types they alias can't be used without the System directive. public class Test { public static void Main() { bool b; //valid Boolean b2; //compiler error int i; //valid Int32 i2; //compiler error string s; //valid String s2; //compiler error } } I have few questions as to why this works. Is the compiler making an exception for these commonly used

How are type aliases resolved when the System directive is missing?

雨燕双飞 提交于 2021-02-11 09:10:33
问题 bool , int ,and string (to name a few), are all aliases of System types. They can all be used without the System directive being included. Yet the types they alias can't be used without the System directive. public class Test { public static void Main() { bool b; //valid Boolean b2; //compiler error int i; //valid Int32 i2; //compiler error string s; //valid String s2; //compiler error } } I have few questions as to why this works. Is the compiler making an exception for these commonly used

How are type aliases resolved when the System directive is missing?

删除回忆录丶 提交于 2021-02-11 09:08:44
问题 bool , int ,and string (to name a few), are all aliases of System types. They can all be used without the System directive being included. Yet the types they alias can't be used without the System directive. public class Test { public static void Main() { bool b; //valid Boolean b2; //compiler error int i; //valid Int32 i2; //compiler error string s; //valid String s2; //compiler error } } I have few questions as to why this works. Is the compiler making an exception for these commonly used

How are type aliases resolved when the System directive is missing?

99封情书 提交于 2021-02-11 09:08:24
问题 bool , int ,and string (to name a few), are all aliases of System types. They can all be used without the System directive being included. Yet the types they alias can't be used without the System directive. public class Test { public static void Main() { bool b; //valid Boolean b2; //compiler error int i; //valid Int32 i2; //compiler error string s; //valid String s2; //compiler error } } I have few questions as to why this works. Is the compiler making an exception for these commonly used