   [.net] define a structture in a class
  so i have this code:Public Class GetIPInfo    'I do not want this structure accessible outside of this class    Protected Structure Locations   Dim Texas As Dictionary(Of String, Integer)   Dim Montana As Dictionary(Of String, Integer)   Dim Washington As Dictionary(Of String, Integer)    End Structure    Private ipFacilities As Locations    Public ReadOnly Property IPs() As Locations   Get  If ipFacilities.Texas.Count = 0 Then ipFacilities.Texas.Add("112.15", 0)  End If  If ipFacilities.Montana.Count = 0 Then ipFacilities.Montana.Add("123.16", 1)  End If  If ipFacilities.Washington.Count = 0 Then ipFacilities.Washington.Add("134.17", 2)  End If  Return ipFacilities   End Get    End Property    ''''' And some more code '''''End ClassNow I get this error: "Error6'TulsaIP' cannot expose type 'Locations' in namespace '<Default>' through class 'GetIPInfo'.C:\Documents and Settings\meTheUser\My Documents\Visual Studio 2008\WebSites\Horizontals\App_Code\GetIPInfo.vb1743C:\...\Horizontals\"Is there a way to define the structure and only have it accessible to that class?   
  Your property is public. The type of your property is protected. Guess the problem.   ;  You can make the nested type private, restricting access to the containing class, but don't expect to be able to then expose it as a property. How would that even work?   ;  Got it. Fail on me. [sad]   ;  From what I understand you probably want to expose those dictionaries without the client to be able to change them (just read them). Even the Reaonly keyword won't help you there. And, as opposed to List<T> which has a AsReadonly method, the .NET dictionary doesn't. But maybe these two threads can help you out:How to declare a constant Dictionary with default values?Is there a read-only generic dictionary available in .NET?Edit: Forgot to mention this is C# code as opposed to VB.[Edited by - unbird on May 25, 2010 3:07:27 PM]