.NET row indexes are zero based. The documentation for Remove
states that the first argument is "Zero-based position to start character deletion."
string r = rep.SysName.Remove(0, 1);
As an alternative, using Substring
more readable, in my opinion:
string r = rep.SysName.Substring(1);
Or, you can use TrimStart
, depending on your requirements. Note that if your line starts with several consecutive slashes, then TrimStart
will delete all of them.)
string r = rep.SysName.TrimStart('/');
source share