Can I do "using namespace.class"?

ohSkittle

I was wondering this as I apparently cannot do this. I have added my .dll as as reference and have added using myNamespace; but whenever I want to call one of the functions, I have to use myClass.myMethod(); is there anything I can do so I wont need to reference the class name when calling a procedure? So I would only need myMethod();

Selman Genç

You can't for now. But in C# 6.0 you will be able able to use using directives for static classes.

For example:

using System.Console;
// ...
Write(4);

You can see the detailed list for all features here

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related