Horje
datatable to array c# Code Example
array object to datatable c#
public static DataTable ArraytoDatatable(Object[,] numbers)
{                 
    DataTable dt = new DataTable();
    for (int i = 0; i < numbers.GetLength(1); i++)
    {
        dt.Columns.Add("Column" + (i + 1));
    }

    for (var i = 0; i < numbers.GetLength(0); ++i)
    {
        DataRow row = dt.NewRow();
        for (var j = 0; j < numbers.GetLength(1); ++j)
        {
            row[j] = numbers[i, j];
        }
        dt.Rows.Add(row);
    }
    return dt;
}
datatable to array c#
string[] arrray = dt.Rows.OfType<DataRow>().Select(k => k[0].ToString()).ToArray();




Csharp

Related
Data at the root level is invalid. Line 1, position 1. Code Example Data at the root level is invalid. Line 1, position 1. Code Example
c# $ string Code Example c# $ string Code Example
c# type from string Code Example c# type from string Code Example
c# remove all items from list where item value is null Code Example c# remove all items from list where item value is null Code Example
defining vectors in c# Code Example defining vectors in c# Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
12