from TextBox.Text documentation
A string containing the text contents of the text box. The default is an empty string ("").
Therefore if a Text box is created, TextBox.Text
is not null
, it is String.Empty
You can't set a null
value to a control text, the setter of the Text property is implemented as below, As per the implementation null
will be convert to empty
set
{
if (value == null)
value = "";
if (value == this.Text)
return;
.....