The problem is that there are two conflicting best practices in developing such an API (they are both good practices and usually do not conflict, except in this particular case):
- The parameter
paramscan / should be displayed as the last parameter. - Function overloads must support the same order of parameters.
So, you have the first overload:
Split(params char[] separator)
params , , .
, separator , params, .
, . params , , .
, separator params. , :
public string[] Split(int count, StringSplitOptions options, params char[] separator)
, API. , params , .
Alternative
, Craig W. , "x".ToCharArray() ( "xyz".ToCharArray() ). , , , , , , .