Hi
I'm newbie to vb.net. Im using vb.net 2005
I want to evaluate if a string is equal to another one but it does not seem to work:
Dim sName as string = "Jack"
if sName = "Jack" then
Msgbox("Jack")
else
Msgbox("Not Jack")
end if
In the above code the if condition is not working and instead of getting a mesage box with Jack I get the second msgbox Not Jack
I have tried sName.equals as well but the same problem
Does anyone can help me
Thanks in advance
I'm newbie to vb.net. Im using vb.net 2005
I want to evaluate if a string is equal to another one but it does not seem to work:
Dim sName as string = "Jack"
if sName = "Jack" then
Msgbox("Jack")
else
Msgbox("Not Jack")
end if
In the above code the if condition is not working and instead of getting a mesage box with Jack I get the second msgbox Not Jack
I have tried sName.equals as well but the same problem
Does anyone can help me
Thanks in advance