SPFieldCollection.ContainsField method

Returns a Boolean value that indicates whether the collection contains the specified field.

Namespace:  Microsoft.SharePoint
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)

Syntax

'Declaration
Public Function ContainsField ( _
    fieldName As String _
) As Boolean
'Usage
Dim instance As SPFieldCollection
Dim fieldName As String
Dim returnValue As Boolean

returnValue = instance.ContainsField(fieldName)
public bool ContainsField(
    string fieldName
)

Parameters

  • fieldName
    Type: System.String

    A string that contains either the display name or the internal name of the field.

Return value

Type: System.Boolean
true if the collection contains the field; otherwise, false.

See also

Reference

SPFieldCollection class

SPFieldCollection members

Microsoft.SharePoint namespace