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
C# doesn't require you to use one or the other as they are equivalent. It is a personal preference and coding convention. So use the one that seems more readable to you and your team. Just one advice: be consistent: do not use an alias in half of your codebase and the full type name in the second half.
string
is an alias for the type System.String
, and int
is an alias for System.Int32
. Therefore, use to your preference.