Instead of looping through each character to see if it\'s the one you want then adding the index your on to a list like so:
var foundIndexes = new List&
How about
string xx = "The quick brown fox jumps over the lazy dog"; char search = 'f'; var result = xx.Select((b, i) => b.Equals(search) ? i : -1).Where(i => i != -1);