Share via


SPFieldCollection.GetFieldByInternalName Method

Returns the field with the specified internal name from the collection.

Namespace:  Microsoft.SharePoint
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: Yes
Available in SharePoint Online

Syntax

'Declaration
Public Function GetFieldByInternalName ( _
    strName As String _
) As SPField
'Usage
Dim instance As SPFieldCollection
Dim strName As String
Dim returnValue As SPField

returnValue = instance.GetFieldByInternalName(strName)
public SPField GetFieldByInternalName(
    string strName
)

Parameters

  • strName
    Type: System.String

    A string that specifies the internal name of the field.

Return Value

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

Exceptions

Exception Condition
ArgumentException

No field with that name exists in the collection.

See Also

Reference

SPFieldCollection Class

SPFieldCollection Members

Microsoft.SharePoint Namespace

InternalName