DataGridViewColumnCollection.Contains Method (String)

 

Determines whether the collection contains the column referred to by the given name.

Namespace:   System.Windows.Forms
Assembly:  System.Windows.Forms (in System.Windows.Forms.dll)

public virtual bool Contains(
	string columnName
)

Parameters

columnName
Type: System.String

The name of the column to look for.

Return Value

Type: System.Boolean

true if the column is contained in the collection; otherwise, false.

Exception Condition
ArgumentNullException

columnName is null.

The name of a column is indicated by the DataGridViewColumn.Name property.

.NET Framework
Available since 2.0
Return to top
Show: