You need to cast the .Text value to an integer. There's nothing excessive about that. That's what you get with a strongly typed language.
Maybe to make it a bit easier to write and run, you could add all the textboxes to a generic list:
List<TextBox> lstTextBoxes = new List<TextBox>();
lstTextBoxes.Add(textBox1);
...
then loop thru the list to add everything up:
int intTotal = 0;
for(int i = 0; i < lstTextBoxes.Count; i++){
intTotal += int.Parse(lstTextBoxes[i].Text);
}
Of course, you'll want to catch formatting errors and such.
-
Peter