C# includes a feature that allows you to use the using
keyword to define aliases for different types or namespaces in your code. This can allow you to provide explicit names for generic types you might reuse often so they are more understandable or easier to type. The feature creates a generic type alias that you may use in the place of the full type name.
For example, we can define and use a List
of string
s like this:
|
|
This feature can also be used to alias namespaces to help you disambiguate classes with the same name from different namespaces without rewriting the full namespace each reference.
|
|
I’ve uploaded other projects on my website at https://worldofzero.com
Join the World of Zero Discord Server: https://discord.gg/hU5Kq2u