Hi can anyone help me out with this line? I don't know what I'm doing wrong. It's for vb.net.
If strProductName Is Not "EOF" Then
Thanks
Printable View
Hi can anyone help me out with this line? I don't know what I'm doing wrong. It's for vb.net.
If strProductName Is Not "EOF" Then
Thanks
er... I havn't done much .NET but I gues you are trying to compare 2 strings????
SO:
If strProductName <> "EOF" Then
would seem a bit more appropriate.
I dont have VBNET... :( *BUT*Quote:
Originally posted by steekyjim
Hi can anyone help me out with this line? I don't know what I'm doing wrong. It's for vb.net.
If strProductName Is Not "EOF" Then
Thanks
I dont know if that would help, but what you are doing is comparing 2 string values and if the two string values are not identical, then *something happens*...
I asume that the productname has to be different from the string "EOF"...
I would use the following line in VB6... (OR EVEN QUICK BASIC ;))
VB Code:
If strProductName <> "EOF" Then
GOTA WRITE FASTER NEX TIME!
Grrrr :p
Just beet you to it! ;)
You could also use the Equals method on String
If s.Equals("EOF") Then
MessageBox.Show("same")
Else
MessageBox.Show("different")
End If