Feature.GetValues

Feature.GetValues method

Returns the values for all the attributes in an array.

public int GetValues(object[] values, object defaultValue = null)
ParameterTypeDescription
valuesObject[]The array into which to copy the attributes values.
defaultValueObjectThe value to return if the attribute value is missing (unset). Default value is null. Consider to use ‘DBNull.Value’ for separating ‘unset’ and ‘null’ values.

Return Value

A number of attributes copied.

Exceptions

exceptioncondition
ArgumentNullExceptionThe argument is null.
InvalidOperationExceptionThe attribute is not locked.

Remarks

The values attributes of the feature are copied into the values array that is passed as a parameter. For attributes with unset value, the specified ‘unsetValue’ parameter is returned. The length of the values array does not need to match the number of attributes in the feature. If the array length is greater than the number of attributes, all of the attribute values are copied into the array; if it is less, only the array length number of attribute values is copied into the array, starting at the attribute value with ordinal 0.

See Also