Hi i have the following code:
static void CalcWordchange()
{
List<string[]> l = new List<string[]>
{
new string[]{Question1, matcheditalian1},
new string[]{"Sam", matcheditalian2},
new string[]{"clozapine", matcheditalian3},
new string[]{"flomax", matcheditalian4},
new string[]{"toradol", matcheditalian5},
};
foreach (string[] a in l)
{
int cost = LevenshteinDistance.Compute(a[0], a[1]);
errorString = String.Format("To change your input: \n {0} \n into the correct word: \n {1} \n you need to make: \n {2} changes \n ".Replace("\n", Environment.NewLine),
a[0],
a[1],
cost);
}
}
Each time a button is clicked the text in the foreach loop runs and outputs a single sentence (the last item in the list). What i want to happen is to output all 5 items into a string.
I have added 4 new variables (errorString2, 3 etc) but cannot work out how to output it.
Any help is appreciated, Thanks