hi and thanks for Reading . I have problems with Foreach loops.
from what I can see that foreach output is done one time for all phases.
here is an example of my problem.
string[] substrings = Regex.Split(Input, splitPattern);
foreach (string match in substrings)
{
Console.WriteLine("'{0}'" , match + "this is first match ") ;
}
output is :
match 1
match 2
match 3
this is first match
Questions 1 my problem is that the word " this is first match " display after all matchs, not after each match. I would like to maniplate each match alone. Because rather the writeline, I am going to assign the values of each match to an object, so if I have 5 matchs that mean 5 objects.
Question 2 : How to treat each match separated (with or without foreach loop).
thanks