2
Reply

Splitting array items and adding them to another array.

Raam Kumar

Raam Kumar

Dec 5 2008 12:25 AM
3k

Hi

I have declared follwoing array...

string[] ArraySingleLineSymbol = { "|\r" };
string[] ArrayTwoLineDoc;
string[] ArrayOneLineDoc;

The ArrayTwoLineDoc has items likes this:

ArrayTwoLineDoc[0] = "12121212 |\r 010101010101"
ArrayTwoLineDoc[1] = "01210220 |\r 2121212"
ArrayTwoLineDoc[2] = "12101220 |\r 1101012"

Now I would like to split the array to ArrayOneLineDoc; So,

so I put

ArrayOneLineDoc = ArrayTwoLineDoc[0].Split(ArraySingleLineSymbol, StringSplitOptions.RemoveEmptyEntries);

This gives me the as

ArrayOneLineDoc [0] = 12121212
ArrayOneLineDoc [1] = 010101010101

but I would like to have something like I want to split the whole items of ArrayTwoLineDoc and put them on ArrayOneLIneDoc? Is this possible? if so How?

Awaiting your response!

Thanks!


Answers (2)