Feature.GetValuesList

Feature.GetValuesList<T> method

Gets the values of an attributes sequence as a list.

public List<T> GetValuesList<T>(string attributeName, string separator, int count = 0)
ParameterDescription
TDesired type for the values.
attributeNameName of the attribute.
separatorA string which is used to separate attribute name and index value of sequence.
countCount of values to return (missed value fill as null)

Return Value

List of values of the attributes which names different by sequence index value.

Exceptions

exceptioncondition
ArgumentNullExceptionThe attribute name is null.
ArgumentExceptionThe attribute with this name does not exist in this layer.
InvalidOperationExceptionThe attribute is not locked.
InvalidOperationExceptionThe value of this attribute is not set for this feature.
InvalidCastExceptionThe requested type does not implement IConvertible.
InvalidCastExceptionValue of the attribute is null, but the requested type is a value type.
FormatExceptionConversion failed because the value is in incorrect format.
OverflowExceptionConversion failed because of overflow.

Remarks

This uses GetValue to get single value. So, this method converts the value automatically to the type requested in the generic type parameter. If attribute with index 0 will not be found it will generate ArgumentException.

See Also