.Text != null
Why? Because .Text property in base class does:
set
{
if (value == null)
{
value = "";
}
.....
}
Above is for TextBox from Windows.Forms, as for TextBox from WebControls it's the same. The getter looks like this:
get
{
string str = (string) this.ViewState["Text"];
if (str != null)
{
return str;
}
return string.Empty;
}
If you don't believe me just try to assign a null value :-)
No comments:
Post a Comment