Pattern: Redundant length argument
Issue: -
An explicitly calculated length argument can be error-prone and is unnecessary when you're slicing to the end of a string or buffer.
Code that omits the length argument is more readable and maintainable.
Example of incorrect code:
string message = "Hello World!";
string world = message.Substring(6, message.Length - 6); // "World!"
Example of correct code:
string message = "Hello World!";
string world = message.Substring(6); // "World!"