This project is read-only.

hi, I tried to convert a result to object

Oct 29, 2014 at 12:21 PM
hi, I tried to convert a result to object:
public dynamic fetch_object(Result rs)
        {
            dynamic x = new DynamicDictionary();
            if (rs.Root != null)
            {
                // Get the first one
                Record r = rs.Root;
                for (int index = 0; index < rs.Table.Length; index++)
                {
                    var column = rs.Table[index];
                    for (int i = 0; i < rs.ColumnCount; i++)
                    {
                        x[column] = r.Data[i];
                    }
                }
            }
            return x;
        }
but it doesnt work correctly.
could anyone help me?