C# can I access an enum without full qualified names

c#, enums

Solution

You can use `using` directive to specify an alias. It will exist everywhere in the file, not in one particular method though.

Problem

I have a C# enum type that ends up with very long qualified names. e.g. ``` DataSet1.ContactLogTypeValues.ReminderToFollowupOverdueInvoice. ``` For readability, it would be nice if I could tell a particular function to just use the last portion of the name, something like... ``` { using DataSet1.ContactLogTypeValues; ... logtype = ReminderToFollowupOverdueInvoice; ... } ``` Is it possible to do anything like this in C#?

Original source