ViewFieldCollection.Add method

Adds the field with the specified field internal name or display name to the collection.

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

Syntax

'Declaration
Public Sub Add ( _
    strField As String _
)
'Usage
Dim instance As ViewFieldCollection
Dim strField As String

instance.Add(strField)
public void Add(
    string strField
)

Parameters

  • strField
    Type: System.String

    Specifies the field internal name or the display name.

Exceptions

Exception Condition
[System.ArgumentException]

Field does not exist in the list. Error code: -2147024809.

Remarks

It must not be a null reference (Nothing in Visual Basic).

See also

Reference

ViewFieldCollection class

ViewFieldCollection members

Microsoft.SharePoint.Client namespace