ContainsColumn Method
The ContainsColumn method returns a flag indicating whether the table schema contains a column with the specified name.
Column name matching behavior is case insensitive.
/// <summary>
/// Gets flag indicating whether data table contains column with specified name
/// </summary>
/// <param name="columnName">Column name</param>
/// <returns>Flag indicating whether data table contains column with specified name</returns>
public bool ContainsColumn(string columnName)
Namespace: PocoDataSet.Data
Assembly: PocoDataSet.Data.dll
_dataTableSchema.ContainsColumn(columnName).true if the schema contains the column name; otherwise returns false.
using PocoDataSet.Data;
using PocoDataSet.IData;
DataTable table = new DataTable();
table.TableName = "Employee";
table.AddColumn("Id", DataTypeNames.INT32);
table.AddColumn("FirstName", DataTypeNames.STRING);
// Column name direct matching
bool hasId = table.ContainsColumn("Id"); // true
// Case insensitive column name matching
bool hasFirstName = table.ContainsColumn("firstname"); // true
// Column name not found even using direct match
bool hasName = table.ContainsColumn("Name"); // false
Table of Content POCO DataSet API References POCO DataSet Types DataTable Members
Business Process Programming in .Net
© 2004–2026 Laskarzhevsky Software Inc.
Unless otherwise noted, the content of this website is licensed under the
Creative Commons Attribution 4.0 International License (CC BY 4.0).
Code examples are provided under the MIT License.
You are free to share and adapt the material provided that appropriate
credit is given and any modifications are clearly indicated.
The information provided on this website is for educational purposes only.
The author and publisher make no warranties regarding the completeness
or suitability of the information and are not responsible for any damages
resulting from its use.