T
Tony
Hello!
Below I have two different ways to test if the instance tb.Text contains the
string "Programmer"
So which one to use is it just a matter of taste ?
Or could it be some advantage to one before the other.
In a book I read they had used the second one but I prefer the first one
because it it clearer.
if (tb.Text == "Programmer")
{
......
}
if (tb.Text.CompareTo("Programmer")
{
......
}
//Tony
Below I have two different ways to test if the instance tb.Text contains the
string "Programmer"
So which one to use is it just a matter of taste ?
Or could it be some advantage to one before the other.
In a book I read they had used the second one but I prefer the first one
because it it clearer.
if (tb.Text == "Programmer")
{
......
}
if (tb.Text.CompareTo("Programmer")
{
......
}
//Tony