|
-
November 20th, 2008, 04:57 PM
#1
How can init a class containing an array?
Hello!
please help me with my beginners-question:
I try to program a Handball-timer-program. Just for fun, as I want to learn some .net programming using basic.
I want to define my data structures first:
so I created a "player" class, containing string for name and a byte for yellow and red cards.
Also I created a "team"-class, containing a single "player".
The "game"-class contains two "team"-s.
1. question: how can I tell my "team"-class to contain an array of 16 elements of "player"
2. how can I init all fields so they do not contain "NULL" but a valid value, i. e. an empty string as the players name?
Thanks a lot!
Marc
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|