This is what MSDN says:
[ComVisibleAttribute (False)]
Public string[] Split (string[] separator,stringsplitoptions options)
Parameters
Separator
Type: system.string[]
An array of strings that delimit substrings in this string, an empty array that does not contain delimiters, or null.
Options
Type: system.stringsplitoptions
Removeemptyentries to omit empty array elements from the returned array, or None to include empty array elements in the returned array.
return value
Type: system.string[]
An array whose elements contain substrings in this string, separated by one or more strings in separator. For more information, see the Remarks section.
Share to: 2014-04-05 21:37 The questioner adopted Answer the passage, pass is gift! Come to join in ~
class
Program
{
static
void
Main(
string
[] args)
{
string
s =
"123,abc1ab"
;
string
[] aa = s.Split(
new
char
[] {
‘,‘
,
‘1‘
}, StringSplitOptions.RemoveEmptyEntries);
string
[] bb = s.Split(
new
char
[] {
‘,‘
,
‘1‘
});
}
}
|
Ask
Thank you very much!!! Where does the box for this local variable open??
Reply
This "local variable" will appear at vs at the bottom by F10 stepping;
Ask
Found, but not used, run out, how are the values in the array empty?
Reply
Be sure to press F10 to start single-step debugging, only in the single-step debugging mode to view local variables;
Ask
No single-step debugging Ah, only the statement .....
Reply
What does the StringSplitOptions in C#string.split (string[], stringsplitoptions) mean, or do you not understand MSDN?