RandomGenerationParameters Constructor (Int32, String)
Constructs a new instance of the RandomGenerationParameters class with the given code length and prefix.
Namespace: Microsoft.CommerceServer.Marketing
Assembly: Microsoft.CommerceServer.Marketing.CrossTierTypes (in Microsoft.CommerceServer.Marketing.CrossTierTypes.dll)
Syntax
'Declaration
Public Sub New ( _
codeLength As Integer, _
prefix As String _
)
'Usage
Dim codeLength As Integer
Dim prefix As String
Dim instance As New RandomGenerationParameters(codeLength, _
prefix)
public RandomGenerationParameters(
int codeLength,
string prefix
)
public:
RandomGenerationParameters(
int codeLength,
String^ prefix
)
public function RandomGenerationParameters(
codeLength : int,
prefix : String
)
Parameters
- codeLength
Type: System..::.Int32
Length of the random codes to generate. The codeLength must be between 0 and 50.
- prefix
Type: System..::.String
String prefix to prepend to the random codes generated. Maximum prefix length is 15 characters.
Remarks
The codeLength is the length of the random codes that will be generated in a batch and does not include the prefix.
Randomly generates promotion codes. The random codes are created using characters from a user configurable dictionary file. The default dictionary file contains the following values: 1234567890BCDFGHJKLMNPQRSTVWXYZ#. The user has to specify the length of the random codes. In addition, user specified prefix and suffix are attached to the beginning and end of the random code.
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
RandomGenerationParameters Class
RandomGenerationParameters Members