Friday, October 12, 2007

Check if a column exists in a DataTable

To check if a column exists in a DataTable / DataRow
From DataTable:
dataTable.Columns.Contains("columnToBeSearched")
From DataRow:
datatRow.Table.Columns.Contains("columnToBeSearched")



1 comment:

Creative Commons License
This work by Tito is licensed under a Creative Commons Attribution 3.0 Unported License.