FieldCollection.GetByTitle Method
Returns the first field object in the collection based on the title of the specified field.
Namespace: Microsoft.SharePoint.Client
Assemblies: Microsoft.SharePoint.Client.Silverlight (in Microsoft.SharePoint.Client.Silverlight.dll); Microsoft.SharePoint.Client (in Microsoft.SharePoint.Client.dll)
Syntax
'Declaration
<RemoteAttribute> _
Public Function GetByTitle ( _
displayName As String _
) As Field
'Usage
Dim instance As FieldCollection
Dim displayName As String
Dim returnValue As Field
returnValue = instance.GetByTitle(displayName)
[RemoteAttribute]
public Field GetByTitle(
string displayName
)
Parameters
displayName
Type: System.StringA title of the Field object that represents the field.
It must not be a null reference (Nothing in Visual Basic). It must not be empty.
Return Value
Type: Microsoft.SharePoint.Client.Field
Returns a Field instance representing the first field object in the collection based on the title of the specified field.
Exceptions
Exception | Condition |
---|---|
[System.ArgumentException] | The field with the specified name does not exist in the collection at the given scope. Error code: -2147024809. |