SaLma A

SaLma A

  • NA
  • 1
  • 0

I have question about Code Append Array to the other one

Apr 8 2009 1:24 PM

hi all,,

first thanks before you help me :)

in the truth I programing aprograme that let you load a text file , then the programe convert the text file to array forme to can make some proccessing on this file

and we add buttom for append other text file in the first text file

so I make the code and there are no error

but the programe stop and never complete ,, I dont know where is the problem , so can you please give me soliution plz ?

this the code

 

In_dataAppend = new double[samples, variables - 3];

Array.Copy(tempData, 0, In_dataAppend , 0, samples * (variables - 3));

int Len = In_data.Length + In_dataAppend .Length;

In = new double[Len, variables - 3]; // just one array allocation

Buffer.BlockCopy(In_data, 0, In, 0, In_data.Length);

Buffer.BlockCopy(In_dataAppend , 0, In, In_data.Length, In_dataAppend.Length);

 

In_Str_dataAppend = new string[samples, variables - 4];

Array.Copy(tempStrData, 0, In_Str_dataAppend, 0, samples * (variables - 4));

int Len2 = In_Str_data.Length + In_Str_dataAppend.Length;

In_str = new string[Len2, variables - 4]; // just one array allocation

Buffer.BlockCopy(In_Str_data, 0, In_str, 0, In_Str_data.Length);

Buffer.BlockCopy(In_Str_dataAppend , 0, In_str, In_Str_data.Length, In_Str_dataAppend.Length);

 

Out_dataAppend = new double[samples];

Array.Copy(tempClasses, 0, Out_dataAppend , 0, samples);

int Len3 = In_data.Length + Out_dataAppend .Length;

Out = new double [Len3]; // just one array allocation

Buffer.BlockCopy(Out_data, 0, Out, 0, Out_data.Length);

Buffer.BlockCopy(Out_dataAppend , 0, Out, Out_data.Length, Out_dataAppend .Length);


Answers (1)