csharp check if textbox is not empty

Code Example - csharp check if textbox is not empty

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

csharp check if string is empty

                        
                                if (string.IsNullOrEmpty(myString)) {
   //
}
                            
                        
 

how to check if textbox is empty in csharp

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