.net 2.0 and VB

G

Guest

I have a VB assembly which contains a web control
(System.Web.UI.WebControls). I am using Visual Studio 2005 and I am
compiling with the .NET 2.0 compiler (VC++ 8.0). This project has a
reference to a C# assemby, which has a netmodule linked into it. This other
managed C++ code contains a type called UNIT. My VB code contains a line,
such as below, which makes reference to the Width property on
System.Web.UI.WebControls.WebControl, which returns a type called
System.Web.UI.WebControls.Unit. However, since VB is not case sensitive, it
gives me an error at compile time, saying that type UNIT is not accessible
because it is private (for the line below). It seems to be finding the UNIT
type in the netmodule, before the Unit type in System.Web.UI.WebControls.

Public Overrides Property Width() As Unit

Is there any way to make VB look in a certain order for the references? Or,
can I suppress the UNIT type in my managed C++ code, using some directive
such as a pragma?

Any help would be appreciated.

Thanks
Chuck
 
M

Mr. Arnold

Chuck Douglas said:
I have a VB assembly which contains a web control
(System.Web.UI.WebControls). I am using Visual Studio 2005 and I am
compiling with the .NET 2.0 compiler (VC++ 8.0). This project has a
reference to a C# assemby, which has a netmodule linked into it. This
other
managed C++ code contains a type called UNIT. My VB code contains a line,
such as below, which makes reference to the Width property on
System.Web.UI.WebControls.WebControl, which returns a type called
System.Web.UI.WebControls.Unit. However, since VB is not case sensitive,
it
gives me an error at compile time, saying that type UNIT is not accessible
because it is private (for the line below). It seems to be finding the
UNIT
type in the netmodule, before the Unit type in System.Web.UI.WebControls.

Public Overrides Property Width() As Unit

Is there any way to make VB look in a certain order for the references?
Or,
can I suppress the UNIT type in my managed C++ code, using some directive
such as a pragma?

Any help would be appreciated.

Thanks
Chuck

So why can't you do this?

public Overrides Poperty Width() As System.Web.UI.WebControls.Unit
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top