AddEnumerationPropertyValue Method (String, String, Int32)
Adds an enumeration value to the current enumerated property with the specified enumeration value, specified language, and rank.
Namespace: Microsoft.CommerceServer.Catalog
Assembly: Microsoft.CommerceServer.Catalog (in Microsoft.CommerceServer.Catalog.dll)
Syntax
'Declaration
Public Sub AddEnumerationPropertyValue ( _
enumValue As String, _
language As String, _
rank As Integer _
)
'Usage
Dim instance As CatalogEnumerationProperty
Dim enumValue As String
Dim language As String
Dim rank As Integer
instance.AddEnumerationPropertyValue(enumValue, _
language, rank)
public void AddEnumerationPropertyValue(
string enumValue,
string language,
int rank
)
public:
void AddEnumerationPropertyValue(
String^ enumValue,
String^ language,
int rank
)
public function AddEnumerationPropertyValue(
enumValue : String,
language : String,
rank : int
)
Parameters
- enumValue
Type: System..::.String
The enumeration value to add.
- language
Type: System..::.String
The language to be used for the enumValue if the property is a multilingual property. Can be nullNothingnullptra null reference (Nothing in Visual Basic).
- rank
Type: System..::.Int32
The rank of this enumeration value (for sequencing)
Exceptions
Exception | Condition |
---|---|
ValidationException | The language is invalid. |
ArgumentNullException | The enumValue is nullNothingnullptra null reference (Nothing in Visual Basic). |
EntityDoesNotExistException | The property does not exist. |
EntityAlreadyExistsException | The enumValue already exists. |
Remarks
You can use this method to add an enumeration value to a property of the Enumeration datatype.
If specified, the language should:
Not be null or blank.
Not exceed 10 characters.
Not contain the ,'[] characters.
Be specified for multilingual properties only.
If specified, the enumValue should:
Not exceed 128 characters.
Be unique for a given language.
Any new enumeration values added to the property will be saved to the catalog system only when the Save method is called.
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
CatalogEnumerationProperty Class
CatalogEnumerationProperty Members