Feature.SetValue

Feature.SetValue<T> method

Sets a new value of an attribute.

public void SetValue<T>(string attributeName, T value)
ParameterDescription
TThe type of the value.
attributeNameThe name of the attribute.
valueThe value of the attribute.

Exceptions

exceptioncondition
ArgumentNullExceptionThe attribute name is null.
ArgumentExceptionThe attribute with this name does not exist in this layer.
InvalidOperationExceptionThe attribute is not locked.
InvalidCastExceptionThe type of the value does not implement IConvertible.
FormatExceptionConversion failed because the value is in incorrect format.
OverflowExceptionConversion failed because of overflow.

Remarks

This method converts the value automatically to the type of the attribute.

See Also