BUG: You cannot resolve private and public nested types in Visual Basic .NET or in Visual Studio 2005 (814605)
The information in this article applies to:
- Microsoft Visual Basic 2005
- Microsoft Visual Basic .NET (2003)
- Microsoft Visual Basic .NET (2002)
SYMPTOMS In a namespace, you may create classes with the same name
but different cases. To do this, use case-sensitive languages, such as
Microsoft Visual C# .NET. You can also access these classes in case-sensitive
languages. In languages that are not case-sensitive, such as Microsoft Visual
Basic .NET or Microsoft Visual Basic 2005, you may receive the following compilation error when you try to
access these classes: 'NameSpace.ClassName' is not
accessible in this context because it is 'Private'. CAUSEThis problem occurs because Visual Basic .NET or Visual Basic 2005 is not a case
sensitive language. If you access objects in an assembly, the Visual Basic .NET or Visual Basic 2005
parser returns the first occurrence of the class in the assembly. If the first
occurrence of the object is not public in scope, the compiler creates an
error.WORKAROUNDTo work around this problem, declare the classes that have
public access modifiers first, and then declare the classes that have
non-public scopes.STATUSMicrosoft has confirmed that this is a bug in the Microsoft products that are listed in the "Applies to" section.
Modification Type: | Minor | Last Reviewed: | 10/3/2006 |
---|
Keywords: | kbvs2005swept kbvs2005applies kbvs2002sp1sweep kbinterop kbImport kbformat kbExport kbdisplay kbDebug kbDevStudio kbDev kbDesigner kbCompiler kbbug KB814605 kbAudDeveloper |
---|
|