Removes the final part of the string, from the last occurring
"\"
character (excluded).
You may re-write it as
s.Remove(s.LastIndexOf("\") + 1, s.Lenght - s.LastIndexOf("\") - 1)
where
s.LastIndexOf("\")
is the index of the last occurring
"\"
character, hence
s.Lenght -s.LastIndexOf("\")-1
is the number of characters following the last
"\"
.
See
String.Remove Method (Int32, Int32)[
^].