Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

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)
[ClientCallableMethodAttribute(Name = "GetByInternalNameOrTitle", CacheReturnValue = true, 
	OperationType = OperationType.Read)]
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.

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.