What are and why use aliases for types in C#

In C# there is number of type aliases. Is is C# programming language type names for Common Language Runtime types. I know two reasons why use them. First, type names like string and bool are common programming languages types that understand and are familiar with most developers. Secondly, it is just shorten names to type and remember. Simplicity and productivity are important qualities.

For using guidelines, usually aliases like string are used when referring to an object like string name = “Saulius”;. When referring to class use static class name String like String.Format(“Is is string.”);.

Hope it helps!


What’s the difference between String and string?

Difference between “String” and “string” in .NET and which is best?


Leave a Reply

Your email address will not be published. Required fields are marked *