I'm trying to set a condition like this
if (myString=!"-1")
{
//Do things
}
But it fails. I've tried
if(myString.Distinct("-1"))
{
//Do things
}
but it doesn't work either.
Try this:
if(myString != "-1")
The opperand is !=
and not =!
You can also use Equals
if(!myString.Equals("-1"))
Note the !
before myString
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With