C# Enter Data Into Texbox
How can I put the conte开发者_StackOverflow中文版nts of a string into the display of a textbox using C#?
Thanks.
Set the Text property.
textBox1.Text = "Hello, world!";
string a = "My Message";
textbox1.Text = a;
The Textbox.Text property contains the string of the Textbox.
String s = "Hello world";
// To set the text of a textbox
tbString.Text = s;
// To append string to the textbox
tbString.Text += s;
精彩评论