Export (0) Print
Expand All

SPFieldCollection.GetField method

Returns the field with the specified internal, display, or static name from the collection.

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

public SPField GetField(
	string strName
)

Parameters

strName
Type: System.String

A string that specifies either the internal, display, or static name of the field.

Return value

Type: Microsoft.SharePoint.SPField
An SPField object that represents the field.

ExceptionCondition
ArgumentException

The field is not found.

Microsoft SharePoint Foundation searches first by internal name; then, if necessary, by display name; finally, if necessary, by static name.

Show:
© 2014 Microsoft