PromoCodeUsageValidationException Constructor (String, String, PromoCodeUsageOption, Boolean)

Initializes a new instance of the PromoCodeUsageValidationException class with a specified error message and a reference to the inner exception that is the cause of this exception.

Namespace:  Microsoft.CommerceServer.Marketing
Assembly:  Microsoft.CommerceServer.Marketing.CrossTierTypes (in Microsoft.CommerceServer.Marketing.CrossTierTypes.dll)

Syntax

'Declaration
Public Sub New ( _
    message As String, _
    propertyName As String, _
    usageOption As PromoCodeUsageOption, _
    isPublicCodeSet As Boolean _
)
'Usage
Dim message As String
Dim propertyName As String
Dim usageOption As PromoCodeUsageOption
Dim isPublicCodeSet As Boolean

Dim instance As New PromoCodeUsageValidationException(message, _
    propertyName, usageOption, isPublicCodeSet)
public PromoCodeUsageValidationException(
    string message,
    string propertyName,
    PromoCodeUsageOption usageOption,
    bool isPublicCodeSet
)
public:
PromoCodeUsageValidationException(
    String^ message, 
    String^ propertyName, 
    PromoCodeUsageOption usageOption, 
    bool isPublicCodeSet
)
public function PromoCodeUsageValidationException(
    message : String, 
    propertyName : String, 
    usageOption : PromoCodeUsageOption, 
    isPublicCodeSet : boolean
)

Parameters

  • message
    Type: System..::.String
    The error message that explains the reason for the exception.
  • propertyName
    Type: System..::.String
    Name of the property that violated the range constraint.

Remarks

The exception is thrown when PromoCodeUsageOption is Public and no public code is set, or if PromoCodeUsageOption is not Public and a public code is set.

Permissions

See Also

Reference

PromoCodeUsageValidationException Class

PromoCodeUsageValidationException Members

PromoCodeUsageValidationException Overload

Microsoft.CommerceServer.Marketing Namespace