AddEnumerationPropertyValue Method (String, String)

Adds an enumeration value to the current enumerated property with the specified enumeration value and in the specified language.

Namespace:  Microsoft.CommerceServer.Catalog
Assembly:  Microsoft.CommerceServer.Catalog (in Microsoft.CommerceServer.Catalog.dll)

Syntax

'Declaration
Public Sub AddEnumerationPropertyValue ( _
    enumValue As String, _
    language As String _
)
'Usage
Dim instance As CatalogEnumerationProperty
Dim enumValue As String
Dim language As String

instance.AddEnumerationPropertyValue(enumValue, _
    language)
public void AddEnumerationPropertyValue(
    string enumValue,
    string language
)
public:
void AddEnumerationPropertyValue(
    String^ enumValue, 
    String^ language
)
public function AddEnumerationPropertyValue(
    enumValue : String, 
    language : String
)

Parameters

  • 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).

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

See Also

Reference

CatalogEnumerationProperty Class

CatalogEnumerationProperty Members

AddEnumerationPropertyValue Overload

Microsoft.CommerceServer.Catalog Namespace