C# has an using static directive since C# 6.0 which is allows to includes more specific things (like classes, interfaces etc.) than namespaces. Well, I tried to include generic type class (System.Collections.Generic.List<T> to be clear). I used using static System.Collections.Generic.List<T>; and program failed. Is there a way to include generic type classes by using using static directive?
using staticwithList<T>? Do you know whatusing staticis used for? (Hint: Read the documentation: learn.microsoft.com/en-us/dotnet/csharp/language-reference/…)using static, but only by instantiating them (using static System.Collections.Generic.List<int>;). In the specific case ofListthis is almost certainly not meaningful. You may be confusing this application ofusingwith how Java deals with imports, but that's not whatusing staticis for.using IntList = System.Collections.Generic.List<int>;(again, this requires instantiating in the case of generics). This is generally intended only to resolve name clashes when they do occur, not as a way to pick and choose from namespaces, which the C# designers didn't consider useful.