how to check if textbox is empty in csharp

Code Example - how to check if textbox is empty in csharp

                
                        string.IsNullOrWhiteSpace(textBox.Text); // returns boolean
                    
                
 

csharp check if textbox is not empty

                        
                                if (String.IsNullOrEmpty(textBox1.Text))
{
    // Do something...
}