This is kind of a beginner’s question but the code I am looking at is in production and I don’t want to break anything. So, just in case: isn’t
text.Substring(index, length).Length
is equivalent to just length?
(Except for the potential ArgumentOutOfRangeException.)
Yes, it will be exactly the same.