Basically im using switch case to set strOutput. But i get duplicate values instead..
strInput="00\~01\02~"
This is what i get:
A
AB
ABC
My desired outcome is:
A
B
C
MatchCollection matches = Regex.Matches(strInput, @"\d{2}\\");
string range = matches[0].Value;
switch (range)
{
case "00\\":
strOutput += "A";
break;
case "01\\":
strOutput += "B";
break;
case "02\\":
strOutput += "C";
break;
}
#endregion
write.WriteLine(strOutput);