A friend asked me how to improve some code with LINQ. How would you do a character by character comparison between two strings to count the number of matches at an index? Here's the original code, could it be improved with LINQ?
private int Fitness(string individual, string target)
{
int sum = 0;
for (int i = 0; i < individual.Length; i++)
if (individual[i] == target[i]) sum++;
return sum;
}