Skip to content

Dictionary To DataTable

Converts a Dictionary to DataTable.

Name Description
Dictionary The input Dictionary.
Result The output DataTable.

When converting the Dictionary to DataTable, the dictionary keys become the column names and the dictionary values become the first row of the data table.


Dictionary<string, object>
    {"Name", "Autossential"},
    {"Year", 2021},
    {"Tool", "UiPath"}

Results in the DataTable:

Name Year Tool
Autossential 2021 UiPath