TableCS - sindizzy/DSW GitHub Wiki

Sample code for loop through a Feature Set's attribute table and get all the values

using System.Windows.Forms;
using DotSpatial.Topology;
using DotSpatial.Data;

 private void btnBuffer_Click(object sender, EventArgs e)
 {
     IFeatureSet fs = FeatureSet.Open(@"C:\[Your File Path](Your-File-Path)\Municipalities.shp");
     fs.FillAttributes();
     DataTable dtOriginal = fs.DataTable;
     for (int row = 0; row < dtOriginal.Rows.Count; row++)
     {
         object[]() original = dtOriginal.Rows[row](row).ItemArray;
     }
 }