Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Dim a, b As String
- a = ""
- b = Nothing
- If a = b Then ' this will NOT throw an error even though B is nothing
- Debug.WriteLine("same")
- Else
- Debug.WriteLine("different")
- End If
- If a.Length > 0 Then
- Debug.WriteLine("string a has a length")
- End If
- If b.Length > 0 Then ' this will throw an error because the object is nothing
- Debug.WriteLine("string b has a length")
- End If
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement