Hmm... Looks like a bug. VB.NET is not case-sensitive so I don't know why it let you define a private THISTYPE. I know VB.NET has at least one other case-sensitive bug (something about the naming of "sub Main").
--- Patrick Steele ([EMAIL PROTECTED]) Lead Software Architect Image Process Design -----Original Message----- From: Jason Bock [mailto:[EMAIL PROTECTED]] Sent: Thursday, April 18, 2002 11:28 PM To: [EMAIL PROTECTED] Subject: [DOTNET] VB.NET, Private Types, and Case Sensitivity 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. You can read messages from the DOTNET archive, unsubscribe from DOTNET, or subscribe to other DevelopMentor lists at http://discuss.develop.com.