Question is: Should I Declare a Class that is an Array not declared as such but is.
Or should I declare the Class with only the members that it contains knowing I must use some of them 6 Times at the same time?
All in the same string.
like in Example 1
class Horse
int[][][] Horse [2][]
then go on to instantiate it either here or in the Main method
Or Example 2
class Horse
class firstTrack : Horse
class second Track : Horse
class thirdTrack : Horse
then each of these subclasses is an Array as well
creating an Array of Arrays I must convert this to strings and perform manipulations and write to files and Database.
Or should I use The
List way of doing it?
before I proceed I must know if there are pitfalls
or easier ways possibly
Any Help would be appreciated Thank You in Advance
Recommended Answers
Jump to PostIf I understand you well, I should have a Horse class, and put it in a List of Horses. Every Horse should have(among others) an int property Track(or something) giving you the track number.
Jump to Postgenerally it helps to try and model the rela world example first. So, sit down and work out what attributes each part of the model needs to have.
I'm guessing you are trying to write a program to deal with a race course of some sort..i'd start somewhere like:…
Jump to PostSorry, you have totally lost me now : /
What are the files you are working with and what do you need to do with them?You seem to have missed what i was trying to say, You are declaring firstTrack, secondTrack and thridTrack as seperate classes, but they …
All 11 Replies
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.