I have a array of two dimensions object[,] data;
. I want to convert the first column of my object into a list<string>
or a list<object>
. here you have my code :
List<string> resultsFields = new List<string>();
object tmp = oRtx.get_ListFields(this.Instrument.ElementAt(i).Key.ToString(), RT_FieldRowView.RT_FRV_EXISTING, RT_FieldColumnView.RT_FCV_VALUE);
if (tmp != null)
{
object[,] data = (object[,])Convert.ChangeType(tmp, typeof(object[,]));
for (int j = 0; j < numItems; j++)
resultsFields.Add(data[j, 0].ToString());
}
in this code, I add each items on data[j, 0]
into my list.
I would like to know if there is a faster method to convert the first column of my object ([0]
) into a list