Check out example codes for "c# object to table". It will help you in understanding the concepts better.

Code Example 1

public static DataTable ToDataTable<T>(this IEnumerable<T> self)
        var properties = typeof(T).GetProperties();

        var dataTable = new DataTable();
        foreach (var info in properties)
            dataTable.Columns.Add(info.Name, Nullable.GetUnderlyingType(info.PropertyType) 
               ?? info.PropertyType);

        foreach (var entity in self)
            dataTable.Rows.Add(properties.Select(p => p.GetValue(entity)).ToArray());

        return dataTable;

Learn ReactJs, React Native from