Let's say there's a public class called ThisType in an assembly under the
VBNET.IsFun namespace.  The GetThisType() method on a SomeObject instance
will return an instance of ThisType.  However, there's also a private class
called THISTYPE in the same namespace.  So...when I try to do this:

    Dim tt as ThisType = SomeObject.GetThisType()

It blows chunks, because it thinks I'm trying to use the private class.  I
tried this:

    Dim tt as VBNET.IsFun.ThisType = SomeObject.GetThisType()

No luck.  So I tried this:

    Dim tt as [ThisType] = SomeObject.GetThisType()

Bzzzt!  So I tried this:

    Dim tt as [VBNET.IsFun.ThisType] = SomeObject.GetThisType()

<batman>Bonk!</batman>

Is there anything I can do to say to the compiler, "No...I don't mean the
private class, I want to use the public class."

Thanks in advance,

Jason

P.S.  I have no control over the assembly I'm using - it came this way so I
have to work around it.  I could write some "helper" code in C# to run the
code that I want to run in VB.NET.  But I have to try and write this code
in VB.NET - at least the majority of it.

You can read messages from the DOTNET archive, unsubscribe from DOTNET, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.

Reply via email to