After perusing the help files regarding collections and serialization I stumbled on the answer which isn't really spelled out in the help file. It has nothing to do with serialization...
The answer is: Why the hell would you want to Dim a remote object as a collection class in the first place? You are creating a new instance of the class, so the collection would be empty. Just Dim an array of the objects contained within the collection.
It dawned on me after I read the phrase, "public properties of collection classes are *not* serialized," for the 10th time.
Thank you for listening...again ;)
>Cathi,
>
>Even without the namespace addition, I can see the non-collection classes fine. I can Dim new objects as non-collection class types. What I can't do is dim new objects as the collection class type.
>
>E.g.
>
>' This works fine
>Dim test1 As New WebProject.localhost.RegularClass
>
>' This doesn't work
>Dim test2 As New WebProject.localhost.CollectionClass
>
>
>In my reference.vb file I see declarations for the regular classes but it seems to have left out all of the collection class declarations.
>
>As I type this I am beginning to suspect that the problem has something to do with the collection class serialization (or lack thereof). I will poke around the help files to research this. However, any insight you may have will be most welcome.
>
>>Hi Keith,
>>
>>The DLL file that contains the System.Collections namespace is already referenced in your project. It is there by default. All you have to do is create a reference to each namespace at the top of your code-behind like the following:
>>
>>
>>using System.Collections;
>>
>>
>>Once this is done, you can reference the classes in the namespace. The Web Reference in the solution manager is for adding Web services to your project.
>>
>>>I have some classes defined in a class file in a Web Service project. When I look at the web reference for the service in my Web Forms project, I don't see any reference to the collection classes (Inherits System.Collections.CollectionBase).
>>>
>>>Is this by design, and is there a way to force .NET to include the collection classes in the web reference without editing the reference.vb file?