The Escape method replaces the string parameter with an escaped version of the same string, returning a value that can contain regular expression reserved characters (such as the pipe character).

The preceding code passes that escaped expression into the Split method to split the string at the double pipe characters. Note that the method returns a string array just as String.Split does, which makes it a convenient replacement.