How do I create a class item with properties?
From: mb (mm_at_hotmail.com)
Date: 09/24/04
- Next message: Sujit D'Mello: "RE: How can I communicate with the parallel port in C#?"
- Previous message: Bob Barrows [MVP]: "Re: HELP PLEASE - need app to modify multiple MDB table designs simultaneously"
- Next in thread: Imran Koradia: "Re: How do I create a class item with properties?"
- Reply: Imran Koradia: "Re: How do I create a class item with properties?"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 23 Sep 2004 20:31:11 -0600
Here is an example of what I want to create:
A class called Cars
public class Cars
{
public string Mazda;
public string Ford;
etc, etc..........
}
then I want to create properties for each car so if I instantiate Cars:
Cars myCar = new Cars();
then I can access this:
myCar.Mazda.Wheels = Color.Black
I hope this makes sense.
Thanks
PS. I want to randomly pick a car and have its Wheel property checked.
- Next message: Sujit D'Mello: "RE: How can I communicate with the parallel port in C#?"
- Previous message: Bob Barrows [MVP]: "Re: HELP PLEASE - need app to modify multiple MDB table designs simultaneously"
- Next in thread: Imran Koradia: "Re: How do I create a class item with properties?"
- Reply: Imran Koradia: "Re: How do I create a class item with properties?"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|