Partilhar via


RemoveEnumerationPropertyValue Method (String)

Removes the enumeration value specified by enumValue from the current enumerated property.

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

Syntax

'Declaration
Public Sub RemoveEnumerationPropertyValue ( _
    enumValue As String _
)
'Usage
Dim instance As CatalogEnumerationProperty
Dim enumValue As String

instance.RemoveEnumerationPropertyValue(enumValue)
public void RemoveEnumerationPropertyValue(
    string enumValue
)
public:
void RemoveEnumerationPropertyValue(
    String^ enumValue
)
public function RemoveEnumerationPropertyValue(
    enumValue : String
)

Parameters

Exceptions

Exception Condition
ValidationException

The language is invalid.

ArgumentNullException

The enumValue is nullNothingnullptra null reference (Nothing in Visual Basic).

EntityDoesNotExistException

The enumValue does not exist in the property.

Remarks

You can use this method to remove an existing enumeration value from a property of the Enumeration datatype. If specified,

The enumValue should:

  • Not exceed 128 characters.

  • Be a valid enumeration value in the property.

Any new enumeration values removed from the property will be removed from the catalog system only when the Save method is called.

Examples

// Remove an enumeration value
property.RemoveEnumerationPropertyValue("Small");
// Call property.Save to Save the changes to the catalog system
property.Save();

Permissions

See Also

Reference

CatalogEnumerationProperty Class

CatalogEnumerationProperty Members

RemoveEnumerationPropertyValue Overload

Microsoft.CommerceServer.Catalog Namespace