How can I make an array with 400 elements of type myClass and pass different args to each of them?
I have two classes: mainClass and myClass. I want to create the array in mainClass. as you can see myClass needs 3 args.
myClass:
namespace prj1
{
class myClass
{
public myClass(int A, int B int C)
{
...
...
...
}
}
}
mainClass:
namespace prj1
{
class mainClass
{
public myClass[] myVar = new myClass[400];
public mainClass(int y, int m, int d)
{
...
...
...
}
}
}
If I have to use setValue to initialize them how can I do this? How should I pass 3 args?
for (int i = 0; i < 400; i++)
{
myVar.SetValue(object Value, i);
}