RosettaCodeData/Task/Empty-string/Visual-Basic-.NET/empty-string-1.visual

15 lines
266 B
Text
Raw Permalink Normal View History

2019-09-12 10:33:56 -07:00
Dim s As String
' Assign empty string:
s = ""
' or
s = String.Empty
' Check for empty string only (false if s is null):
If s IsNot Nothing AndAlso s.Length = 0 Then
End If
2020-02-17 23:21:07 -08:00
' Check for null or empty (more idiomatic in .NET):
2019-09-12 10:33:56 -07:00
If String.IsNullOrEmpty(s) Then
End If