hi guys,
Does anyone knows how to highlight the words that are wrong at string str2 when compared to string str1? Below is my coding. Thanks.
string str1 = "This is an good example, i like it.";
string str2 = "This is a bad example, i dislike it.";
str1.Split(' ', ',', '.');
str2.Split(' ', ',', '.');
int i = 0, error = 0;
int intWordLength = str1.Split(' ', ',', '.').Length;
while (i < intWordLength)
{
if (!str1.Split(' ', ',', '.')[i].Equals(str2.Split(' ', ',', '.')[i]))
error++;
i++;
}
Response.Write(error.ToString());