Fjodr
Fjodr

Reputation: 923

Using a type without namespace specification or import

I know that this is not really clean but it is possible as I am seeing it right now. I have no import for System.Web.UI.WebControls. All I have is a reference to System.Web. The type is used like this:

    Private plhZoneContexte As PlaceHolder

PlaceHolder is under System.Web.UI.WebControls so I should prefix it like this if not imported:

    Private plhZoneContexte As System.Web.UI.WebControls.PlaceHolder

The problem is that I can't use imports or prefixes for this case. I'm not allowed to do this kind of modification. This is the way the app worked before, and this is the way the newer version should work.

Any ideas?

Upvotes: 0

Views: 139

Answers (1)

Jason Tyler
Jason Tyler

Reputation: 1389

You could import the namespace in the project properties. That would remove the necessity of adding Imports or prefixes.

Project properties for a VB.NET project

Upvotes: 2

Related Questions