How should this indexof be?
Posted on 2009-07-09
If I add Andersson I get it right
But if I add aaaaaa its not right
if (contact[i].LastName.ToLower().IndexOf(letter.ToString().ToLower())== 0)
What I am after is that every word that starts with for example A should be true. But in the case of aaaaa I get the number 4 back in debug mode. How should my if statment be to be like I want to happen?