View Single Post
  #2 (permalink)  
Old 01-13-06, 01:46 PM
Squintz Squintz is offline
Newbie Coder
 
Join Date: Jan 2006
Location: Maryland
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
using Microsoft.VisualBasic;
Collection aCollectionObj = new Collection();

I was curious about the answer to this also and it seem that collections are handled a little differnt in VB.net. You may be able to get around the issue by using the Microsoft.VisualBasic namespace which should expose all the VB objects to you. However, I have not tried this so I do not know that for sure.

Just the other day I had to create a collection of my own object. I found an example of how to Implement the IList interface which was the only method that I could use because I also needed to inherit from MarshalByRefObject and you can only inherit from one object but may implement many interfaces.

So basically what I did was created MyClass and then created a second class which I called MyClassCollection. The in that class I implemented the IList.

I have to run but will get back to you with more details if you want them.

Try using this vb.net to C# translator if you have more situations like this.
http://www.carlosag.net/Tools/CodeTr...r/Default.aspx
Reply With Quote