项目信息
- Windows Presentation Foundation项目
- C#作为编程语言
描述
如何使用GetValue()
从文本框中获取值?
当我运行GetValue(TextBox)
时,将打印以下错误:
"TextBox"是";Typ";并且在此上下文中不可用
TextBox
是类型(类(。你需要一个那种类型的对象。
TextBox _myTextBox = new TextBox();
// :
// :
string text = _myTextBox.Text;