[英]C# Enter Data Into Texbox
How can I put the contents of a string into the display of a textbox using C#? 如何使用C#将字符串的内容放入文本框的显示中?
Thanks. 谢谢。
设置文本属性。
textBox1.Text = "Hello, world!";
string a = "My Message";
textbox1.Text = a;
The Textbox.Text property contains the string of the Textbox. Textbox.Text属性包含Textbox的字符串。
String s = "Hello world";
// To set the text of a textbox
tbString.Text = s;
// To append string to the textbox
tbString.Text += s;
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.