I have a unique situation where I need to create string arrays that have null in position zero and then a split string for the remaining positions. For example, I want to input the following string:
"this/\is/\a/\test/\string"
to output the following results
array[0] = null;
array[1] = "this";
array[2] = "is";
array[3] = "a";
array[4] = "test";
array[5] = "string";
I know I can accomplish this in a clunky way with a number of lines of code, but I'm looking for an elegant way to split a string to a specific array position, or just to insert null before it. An empty string for position 0 would also be acceptable but not ideal. Is there a good way to accomplish this? The number of array positions will vary, as the input string will have varying numbers of parameters I need to pull.
Array.Copyand copy it to index 1 and set index 0 tonull.