© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•2y ago•
39 replies
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]));
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
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

✅ Trying to count numbers on a string
C#CC# / help
3y ago
force 'normal' standards for parsing decimal numbers from string
C#CC# / help
4y ago
Sorthing house numbers of type string
C#CC# / help
14mo ago
Defining and checking a 2D string array
C#CC# / help
2y ago