+92 332 4229 857 99ProjectIdeas@Gmail.com

String.IsNullOrEmpty function (Vb.net)


String IsNullOrEmpty function
String.IsNullOrEmpty() indicates whether the specified string is empty or not.
System.string is the library for this function.
 
Example
Dim str1 As String = "Saad"
Dim str2 As String = "Saulat"
Dim str3 As String = "Bin"
Dim str4 As String = String.Empty
MsgBox(String.IsNullOrEmpty(str1))
MsgBox(String.IsNullOrEmpty(str2))
MsgBox(String.IsNullOrEmpty(str3))
MsgBox(String.IsNullOrEmpty(str4))
Result
First message box will return false because string str1 is not empty.
Second message box will return false because string str2 is not empty.
Third message box will return false because string str3 is not empty.
Fourth message box will return true because string str4 is empty.


Related articles

0 comments: