Add Method

Add a specified ContentSelectionContext to the end of the ContentSelectionContextCollection.

Namespace:  Microsoft.CommerceServer.Runtime.Targeting
Assembly:  Microsoft.CommerceServer.Runtime (in Microsoft.CommerceServer.Runtime.dll)

Syntax

'Declaration
Public Sub Add ( _
    name As String, _
    context As ContentSelectionContext _
)
'Usage
Dim instance As ContentSelectionContextCollection
Dim name As String
Dim context As ContentSelectionContext

instance.Add(name, context)
public void Add(
    string name,
    ContentSelectionContext context
)
public:
void Add(
    String^ name, 
    ContentSelectionContext^ context
)
public function Add(
    name : String, 
    context : ContentSelectionContext
)

Parameters

  • name
    Type: System..::.String
    Name of the context to add. May not be nullNothingnullptra null reference (Nothing in Visual Basic).

Exceptions

Exception Condition
ArgumentNullException

name or context parameter is nullNothingnullptra null reference (Nothing in Visual Basic).

Remarks

Adds a member to the ContentSelectionContextCollection collection object. The ContentSelectionContext object is added to the end of the ContentSelectionContextCollection. The Count of the collection is incremented.

Permissions

See Also

Reference

ContentSelectionContextCollection Class

ContentSelectionContextCollection Members

Microsoft.CommerceServer.Runtime.Targeting Namespace