Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Returns the field with the specified internal, display, or static name from the collection.
Namespace: Microsoft.SharePoint
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Syntax
'Declaration
Public Function GetField ( _
strName As String _
) As SPField
'Usage
Dim instance As SPFieldCollection
Dim strName As String
Dim returnValue As SPField
returnValue = instance.GetField(strName)
public SPField GetField(
string strName
)
Parameters
strName
Type: System.StringA 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.
Exceptions
| Exception | Condition |
|---|---|
| ArgumentException | The field is not found. |
Remarks
Microsoft SharePoint Foundation searches first by internal name; then, if necessary, by display name; finally, if necessary, by static name.