Skip to content

Instantly share code, notes, and snippets.

@shengoo
Created May 8, 2014 07:54
Show Gist options
  • Save shengoo/77b548318f7cd0d5d027 to your computer and use it in GitHub Desktop.
Save shengoo/77b548318f7cd0d5d027 to your computer and use it in GitHub Desktop.
Selected columns from DataTable
var view = new DataView(datatable);
var myRows = view.ToTable(false, "id").Select();
var idlist = myRows.Select(x => x["id"]).ToList();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment