I like
If (stringName.Length 0) Then
'String is not nothing
Else
'String is empty
End If
The above is relatively fast. You can also Trim() if you are not sure the
string is not full of spaces:
If (textBoxName.Text.Trim().Length 0) Then
End If
There are a variety of ways to do this:
If Not (stringName = String.Empty) Then
etc.
--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA
http://gregorybeamer.spaces.live.com
********************************************
Think outside the box!
********************************************
"shapper" <md*****@gmail.comwrote in message
news:11**********************@l53g2000cwa.googlegr oups.com...
Hello,
I need to check if a string is empty.
Should I use:
String.IsNullOrEmpty(MyString) or MyString Is Nothing?
What is the difference?
Thanks,
Miguel