473,507 Members | 8,335 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Vb Class collections

Lou
Is there a class wizard like in VB6 to create a collection class?
I have class1 and want a class collection of class1's
-Lou

May 31 '07 #1
4 1216
"Lou" <lo********@comcast.netwrote in news:OGNbs06oHHA.4772
@TK2MSFTNGP05.phx.gbl:
Is there a class wizard like in VB6 to create a collection class?
I have class1 and want a class collection of class1's

Just inherit from a collection type.

You surely don't need a wizard to create a collection...?

May 31 '07 #2
On May 31, 1:57 pm, "Lou" <lou.gar...@comcast.netwrote:
Is there a class wizard like in VB6 to create a collection class?
I have class1 and want a class collection of class1's
-Lou
I use class collections all the time, no need for a wizard to create
them.

Public Class ClassA
Private Property X as int
Private Property Y as int
End Class

Public Class myClass
Public Sub myMethod
Dim myList as new List(of ClassA)
Dim myListMember as ClassA
myListMember = New ClassA
myListMember.X = 123
myListMember.Y = 456
myList.Add(myListMember)
etc ...
End Class

May 31 '07 #3
On May 31, 3:32 pm, z...@construction-imaging.com wrote:
On May 31, 1:57 pm, "Lou" <lou.gar...@comcast.netwrote:
Is there a class wizard like in VB6 to create a collection class?
I have class1 and want a class collection of class1's
-Lou

I use class collections all the time, no need for a wizard to create
them.

Public Class ClassA
Private Property X as int
Private Property Y as int
End Class

Public Class myClass
Public Sub myMethod
Dim myList as new List(of ClassA)
Dim myListMember as ClassA
myListMember = New ClassA
myListMember.X = 123
myListMember.Y = 456
myList.Add(myListMember)
etc ...
End Class
Didn't get the syntax for the ClassA properties, but you should get
the picture.

May 31 '07 #4
Lou
Thanks , works great.

<za***@construction-imaging.comwrote in message
news:11**********************@q66g2000hsg.googlegr oups.com...
On May 31, 3:32 pm, z...@construction-imaging.com wrote:
>On May 31, 1:57 pm, "Lou" <lou.gar...@comcast.netwrote:
Is there a class wizard like in VB6 to create a collection class?
I have class1 and want a class collection of class1's
-Lou

I use class collections all the time, no need for a wizard to create
them.

Public Class ClassA
Private Property X as int
Private Property Y as int
End Class

Public Class myClass
Public Sub myMethod
Dim myList as new List(of ClassA)
Dim myListMember as ClassA
myListMember = New ClassA
myListMember.X = 123
myListMember.Y = 456
myList.Add(myListMember)
etc ...
End Class

Didn't get the syntax for the ClassA properties, but you should get
the picture.

May 31 '07 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
2172
by: Rodney | last post by:
Hi all, Can someone please show me how to unit test this class listed below: Public MustInherit Class DataCollectionBase Implements IEnumerable, IEnumerator Protected m_dv As DataView...
10
3452
by: Not Available | last post by:
On the host server: namespace JCart.Common public class JCartConfiguration : IConfigurationSectionHandler private static String dbConnectionString; public static String ConnectionString { get...
4
52915
by: matty.hall | last post by:
I have two classes: a base class (BaseClass) and a class deriving from it (DerivedClass). I have a List<DerivedClass> that for various reasons needs to be of that type, and not a List<BaseClass>....
7
1722
by: erin.sebastian | last post by:
Hello Everyone, This is my first attempt at coding using an abstract class and i am getting an error i can't figure out. Here is the back ground. I have a project that contains an abstract...
20
1420
by: Scott M. | last post by:
What are the advantages of defining a class as part of another class definition (nesting classes)?
0
2465
by: jeytu | last post by:
Hi all, I'm a newbie with .net. I have created a web method that would return a class. The definition of the class is <Serializable()> Public Class Response Dim l_status As Boolean ...
1
3645
by: davebaranas | last post by:
I am able to serialize this but I get a null exception when I try to deserialize it back Even if I don't make any child classes it throws "Object reference not set to an instance of an object."...
2
1643
by: Big Charles | last post by:
Hello, I would like to create an array-class to be able to call like: Dim oMyCar as New MyCar ' After initializing oMyCar, the object has to be like: oMyCar(0).Brand...
8
2522
by: Andrus | last post by:
Code below causes error in class definition line .....Isolator<T>' does not implement interface member 'System.Collections.IEnumerable.GetEnumerator()'. 'Myapp.Isolator<T>.GetEnumerator()'...
1
2577
by: jc | last post by:
RE: Why use a CollectionBase class here vs dataset or dataview? I'm looking at some vb.net 2005 code that was generated from a homegrown Codesmith Template that generate all of the retreival and...
1
7029
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7481
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5619
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
4702
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3190
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3179
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1537
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
758
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
411
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.