窗体中有一个年龄文本框 txtAge 下面 代码可以获得文本框中的年龄值。
已帮助 人
窗体中有一个年龄文本框 txtAge,下面 代码可以获得文本框中的年龄值。
A.int age = txtAge;
B.int age = txtAge.Text;
C.int age = Convert.ToInt32(txtAge);
D.int age = int.Parse(txtAge.Text);

回答
共1条回复-
int age = int.Parse(txtAge.Text);
