Share via


ViewFieldCollection.MoveFieldTo method

Moves the field with the specified field internal name to the specified position in the collection.

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

Syntax

'Declaration
Public Sub MoveFieldTo ( _
    field As String, _
    index As Integer _
)
'Usage
Dim instance As ViewFieldCollection
Dim field As String
Dim index As Integer

instance.MoveFieldTo(field, index)
public void MoveFieldTo(
    string field,
    int index
)

Parameters

  • index
    Type: System.Int32

    Specifies the position for the field. The first position is 0.

Exceptions

Exception Condition
[Microsoft.SharePoint.SPException]

Field does not exist in the collection. Error code: -2146232832.

Remarks

It must not be a null reference (Nothing in Visual Basic). Its value must be equal to or greater than 0.

See also

Reference

ViewFieldCollection class

ViewFieldCollection members

Microsoft.SharePoint.Client namespace