Lucas Lucas - 2 years ago 143
C# Question

C# equivalent to wildcard imports in Java

Is there a way in C# to import everything inside a namespace like there is in Java with the wildcard character?

import java.awt.*;

Answer Source

That's what the normal using directive does. For instance:

using System;

means you can use Console, Guid, Int32 etc without qualification. The closest equivalent to the single import in Java is:

using Console = System.Console;


but that's not used very often.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download