I want to do is define multiple arrays inside a class or struct.
To be more precise, I want to to define a struct than contains an two or three arrays of another struct type. Is using classes easier ??
I want to do something like this :
public class mystudentclass
{
struct subject
{
string name;
string teacher;
string classroom;
}
struct student
{
string firstname;
string lastname;
int age;
subject[] subjects;
}
}
How can I do something like this ?? Or do I need to find some other way to do it
CHEERS !!
Sum Pun
To be more precise, I want to to define a struct than contains an two or three arrays of another struct type. Is using classes easier ??
I want to do something like this :
public class mystudentclass
{
struct subject
{
string name;
string teacher;
string classroom;
}
struct student
{
string firstname;
string lastname;
int age;
subject[] subjects;
}
}
How can I do something like this ?? Or do I need to find some other way to do it
CHEERS !!
Sum Pun