Quantcast
Channel: VBForums - Visual Basic .NET
Viewing all articles
Browse latest Browse all 27156

Nothing vs ""

$
0
0
Dim MyString as string = ""

MyString="X"

mystring=replace(mystring,"X","")

' mystring is now equal to ""

mystring=replace(mystring,"X","")

' mystring is now equal to nothing

' which breaks

if mystring.contains("X") then
end if


very confused on the difference between nothing and "", and how it breaks the contains statement.

Viewing all articles
Browse latest Browse all 27156

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>