Raam Kumar

Raam Kumar

  • NA
  • 13
  • 0

Splitting array items and adding them to another array.

Dec 5 2008 12:25 AM

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)