advertise with us

Omit type name when calling static methods with the using static directive in C#

The using static directive was introduced in C# 6 and allows us to omit the type name when calling static methods… cool right?

but I wouldn’t use this when omitting the type name would result in ambiguity or confusion for the next developer about what class a static method is in.

The examples below are from Microsofts documentation


Need Help with Your C# Projects?

We offer expert support and development services for projects of any size. Contact us for a free consultation and see how we can help you succeed.

CONTACT US NOW