D
DaveL
string s = "Bob,Carol";
string sTest = "Bob";
Console.WriteLine(s.IndexOf(sTest)); // Returns 0 this is valid
sTest=""; // lets say we get this value from a database or someother data
and it is trimmed and empty
Console.WriteLine(s.IndexOf(sTest)); // Returns 0 should this in fact
be -1, this Returns 0 valid location in string
Console.ReadKey();
Thanks DaveP
string sTest = "Bob";
Console.WriteLine(s.IndexOf(sTest)); // Returns 0 this is valid
sTest=""; // lets say we get this value from a database or someother data
and it is trimmed and empty
Console.WriteLine(s.IndexOf(sTest)); // Returns 0 should this in fact
be -1, this Returns 0 valid location in string
Console.ReadKey();
Thanks DaveP