G
Guest
I have the following single-line if statement that is evaluating true even
though it shouldn't. I have never seen this before and I am concerned that
this can happen in other areas of my code.
If String1.Length > 0 Then String2 = String1
where String1 = ""
This statement also evaluates as true when String1 = "":
If String1 <> "" Then String2 = String1
Changing the If statement to a multi-line If statement corrects the problem:
If String1.Length > 0 Then
String2 = String1
End If
Has anyone else seen this problem or know what's going on?
Thanks
though it shouldn't. I have never seen this before and I am concerned that
this can happen in other areas of my code.
If String1.Length > 0 Then String2 = String1
where String1 = ""
This statement also evaluates as true when String1 = "":
If String1 <> "" Then String2 = String1
Changing the If statement to a multi-line If statement corrects the problem:
If String1.Length > 0 Then
String2 = String1
End If
Has anyone else seen this problem or know what's going on?
Thanks