how to check the textfield is empty

Simple:
If Textfield.Text == “”

if(textfieldVariable == “”) or if(textfieldVariable == null) or if(!textfieldVariable != null) or any combination ^.^

The question is, what is empty for you because empty can be this "" but empty can be this " " too…

Edit: You can also now use the .Net String.IsNullOrEmpty function.

if(textfieldVariable.IsNullOrEmpty) {
     print("There's nothing here, cap'n");
}

– David