C
Carlos
Ok I have the following Jagged array
double[][] mData = new double[259200][];
for (int x = 0; x <= 259200-1; x++)
{
mData[x]=new double[3];
}
And I load the data in to the array :
while (SR.Peek() >=0)
{
try
{
RecordLine = SR.ReadLine();
if (RecordLine != null)
{
TempStrVal=
RecordLine.Split(',');
mData[RecNum][0]=double.Parse(TempStrVal[0]);
mData[RecNum][1]=double.Parse(TempStrVal[1]);
mData[RecNum][2]=double.Parse(TempStrVal[2]);
RecNum++;
}
}
catch(Exception ex)
{
MessageBox.Show(ex.ToString());
}
}
Now I need to sort the array using the third column or element of the second
array keeoing the values that belong to that element same, like when you
have three columns in excel and select to sort by column C so all values
rearrange. Any idea How can I do that.
Thansk in advance
double[][] mData = new double[259200][];
for (int x = 0; x <= 259200-1; x++)
{
mData[x]=new double[3];
}
And I load the data in to the array :
while (SR.Peek() >=0)
{
try
{
RecordLine = SR.ReadLine();
if (RecordLine != null)
{
TempStrVal=
RecordLine.Split(',');
mData[RecNum][0]=double.Parse(TempStrVal[0]);
mData[RecNum][1]=double.Parse(TempStrVal[1]);
mData[RecNum][2]=double.Parse(TempStrVal[2]);
RecNum++;
}
}
catch(Exception ex)
{
MessageBox.Show(ex.ToString());
}
}
Now I need to sort the array using the third column or element of the second
array keeoing the values that belong to that element same, like when you
have three columns in excel and select to sort by column C so all values
rearrange. Any idea How can I do that.
Thansk in advance