c#: difference between “System.Object” and “object”
问题 In C#, is there any difference between using System.Object in code rather than just object , or System.String rather than string and so on? Or is it just a matter of style? Is there a reason why one form is preferrable to the other? 回答1: string is an alias for global::System.String . It's simply syntactic sugar. The two are exactly interchangable in almost all cases, and there'll be no difference in the compiled code. Personally I use the aliases for variable names etc, but I use the CLR type