Add Method (String, Profile)
Add a Profile object containing targeting properties to the end of the TargetingProfileCollection.
Namespace: Microsoft.CommerceServer.Runtime.Targeting
Assembly: Microsoft.CommerceServer.Runtime (in Microsoft.CommerceServer.Runtime.dll)
Syntax
'Declaration
Public Sub Add ( _
name As String, _
profile As Profile _
)
'Usage
Dim instance As TargetingProfileCollection
Dim name As String
Dim profile As Profile
instance.Add(name, profile)
public void Add(
string name,
Profile profile
)
public:
void Add(
String^ name,
Profile^ profile
)
public function Add(
name : String,
profile : Profile
)
Parameters
- name
Type: System..::.String
Name of the profile. This must match the profile identifier portion of any expressions that are to evaluate against the profile. May not be nullNothingnullptra null reference (Nothing in Visual Basic).
- profile
Type: Microsoft.CommerceServer.Runtime.Profiles..::.Profile
Profile to add. May not be nullNothingnullptra null reference (Nothing in Visual Basic).
Exceptions
Exception | Condition |
---|---|
ArgumentNullException | One of the required parameter values was null. |
Remarks
Adds a Profile to the TargetingProfileCollection collection object. The Profile object is added to the end of the TargetingProfileCollection. The Count of the collection is incremented.
Permissions
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.
See Also
Reference
TargetingProfileCollection Class