C#C
C#2y ago
zzz

adding numbers from a string array

int dpMark = int.Parse((data[3] + data[4] + data[5] + data[6] + data[7] + data[8] + data[9] + data[10]));

the data array is a string array that contains student data like name student id but also contains exam marks, i am trying to add all the marks to get a total mark (total should be 12) and im getting this number when i outputted it to test?
image.png
Was this page helpful?