Using Split() without parameters, what is the default delimiter?
In case of no values it's white space - source from here:
If the separator argument is null or contains no characters, the method treats white-space characters as the delimiters. White-space characters are defined by the Unicode standard; they return true if they are passed to the Char.IsWhiteSpace method.
If you look at the source, you can see that if you're passing null
or an empty array (default for a params
parameter if you omit the argument), it's using Char.IsWhiteSpace
to check if the string contains whitespace characters and adds them to the list of separators.
ProTip! Next time you're wondering what a framework method does, check out the source at sourceof.net.