therefore In c# an array of objects is considered
an object.so after declaring array of objects,
each elements of the array must be created.but
in c++ and java it's done in different ways.
as an example below shows the code snippet to
create array of obj: in c# -
first we declare the array of objects-
ClassName arr=new ClassName[10];
where ClassName is the class name.
now the following codes shows how to create
each individual part or the array of objects.
for(int i=0,i<10;i++) arr[i]=new ClassName();
where ClassName() is the constructor of the
Object Class.
the full program is written below-
class ClassName{
private members declaration and methods
declaration here..
}
public static void main(){
ClassName arr=new ClassName[10];
for(int i=0,i<10;i++) arr[i]=new ClassName()
}