What is the equivalent of this line in C#?
// In Java:
string[] split = val.Split("\u0000");
I know that:
- The Java split function takes a regular expression.
- "\u0000" is the null character in Java.
- In C#, when you pass null into string.Split it has special meaning. Using
"my example string".Split(null)
means to split on any white space character.
So, is the above line splitting a string on a null character, or is it shorthand for splitting the string on any white space character? If the former, how would I construct a split in C# to split on a null character?