You can use Split
to split the string on the '|'
character, then the System.Linq
extension method Skip
to skip the first 5
results, and finally string.Join
to connect the remaining parts together again using the '|'
character to join them:
string result = string.Join("|", test.Split('|').Skip(5));