if (string.IsNullOrWhiteSpace(TextBox1.Text)) { Label1.Text = null; }
string.IsNullOrEmpty
string.IsNullOrWhiteSpace
if(TextBox1.Text == "") Label1.Text = "" ;
if(String.IsNullOrEmpty(TextBox1.Text)) { Label1.Text = string.Empty }
private void textBox1_TextChanged(object sender, EventArgs e) { label1.Text = textBox1.Text; }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)