Difference between !String.IsNullOrEmpty and !='' and !=null in C#

Last Reply one year ago By pandeyism

Posted one year ago

Can anyone tell me what does this if stmts mean? i am new to C#.

1.
if (!string.IsNullOrEmpty(textbox.Text)) {
.........
}

2.
 if (Textbox.Text != "")
 {
 ....
 }
 
 3.
 
 if (Textbox.Text != null)
 {
 ....
 }
This question does not have replies that have been liked.