.net 2.0 and VB

.net 2.0 and VB

am 18.10.2007 21:06:03 von Chuck Douglas

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

Re: .net 2.0 and VB

am 20.10.2007 08:05:06 von MR. Arnold

"Chuck Douglas" wrote in message
news:74E2DE55-91AD-4A3E-9E60-586A7A1C768F@microsoft.com...
>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