I think the
Split
method of
string
class can be used as below
string val = "Value1|Value2|Value3|Value4|Value5|Value6|Value7|Value8|Value9|Value10";
string[] vals = val.Split(new char[]{'|'}, StringSplitOptions.RemoveEmptyEntries);
string val7 = vals[6];
Console.WriteLine (val7);