VB.net · Snippet · ASP.net
Nothing vs empty string
VB.net: the difference between Nothing (no string at all) and an empty string ('').
How to use Nothing vs empty string:
Paste the code into the class or page, then call it from the method that needs the result.IsNullOrEmpty is true for both. A database NULL arrives as Nothing. Always check IsNullOrEmpty before calling methods on the value.If String.IsNullOrEmpty(text) Then
text = ""
End If