I know how to pass a list of values in arrays
int[] unit = new int[] {1,-3,3,4};
string[] letter_grade = new string[] {"a+","B","c","W"};
double totalGPA;
GPA get = new GPA();
get.getgpa(unit, letter_grade ,out totalGPA);
but i wanted to know how to pass it using structs i can send single value but not getting how to send list of values
double totalGPA;
GPA get = new GPA();
GPAList[] Val = new GPAList[1];
Val[0].grade ="d";
Val[0].unitgrade = 4;
get.getgpa(Val[0], out totalGPA);
You just pass the struct array
Valto getgpa:Then
getgpashould accept a array of GPA structs: