Error when trying to get an int from textbox

前端 未结 5 1115
时光取名叫无心
时光取名叫无心 2021-01-20 04:37

I am new to C# and programming in general. I was able to create the required program in Console but want to get one working with Forms as well. I am running into an issue wh

5条回答
  •  没有蜡笔的小新
    2021-01-20 05:12

    You're declaring locally scoped variables that will replace your actual textboxes. Yo ushould use local variables that have different names like:

    int length = int.Parse(LengthtextBox.Text);
    int width = int.Parse(WidthtextBox.Text);;
    int height = int.Parse(HeighttextBox.Text);;
    

提交回复
热议问题