When does it matter whether you use int versus Int32, or string versus String?

前端 未结 8 719
慢半拍i
慢半拍i 2021-01-19 14:02

In C#, the keywords for built-in types are simply aliases for corresponding types in the System namespace.

Generally, it makes no difference whether yo

8条回答
  •  無奈伤痛
    2021-01-19 14:25

    It doesn't matter. int is basically a shorthand for System.Int32 they are almost perfectly interchangable. Consider it a #define if you like (but C# doesn't allow #defines like that).

提交回复
热议问题