Possible Duplicate:
Is there a simpler way to do this if statement in C#
I have this code:
while ((txtSource.Text[startPos].ToString() == " ") ||
(txtSource.Text[startPos].ToString() == ",") ||
(txtSource.Text[startPos].ToString() == ".")))
{
// do something
}
is there any way to do the above like for instance:
while (!txtSource.Text[startPos].ToString() in (" ",",","."))