How to set a type alias for an entire namespace scope in C #

I want to use an alias for a data type by doing the following:

using MyGUID = System.GUID; 

How can I make an area of ​​this namespace without adding this line for each class in my project?

+4
source share
1 answer

Instead, create an extension method that encapsulates the operations (operations) that you want to include uisng System.Guid. If the extension is in the base namespace used throughout the project, it would not have to be included in it and it would be easy to access it in accordance with the target classes. Hth

0
source

Source: https://habr.com/ru/post/1389163/


All Articles