You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// This method group looks fine, but should be an instance method on Argument, or a non-extension method somewhere else.// I recommend using different names for the two overloads. That would allow you to use `params string[] args` for the latter.// Argument::Parse(string) and Argument::ParseArguments(params string[] args), maybe?publicstatic ParseResult Parse(thisArgumentargument,stringcommandLine);publicstatic ParseResult Parse(thisArgumentargument,string[]args);}
The text was updated successfully, but these errors were encountered:
params string[] args doesn't seem that useful here, anyway. Callers would usually have the args in a collection object already, except perhaps in tests where you can just do new[] { "…", … }.
params string[] args doesn't seem that useful here, anyway. Callers would usually have the args in a collection object already, except perhaps in tests where you can just do new[] { "…", … }.
And we've been trying to discourage testing that way because it requires you to know how the command line input string will be split into an array of strings, which is not at all straightforward: #1758.
The text was updated successfully, but these errors were encountered: