Skip to main content

EnumDescriptor.Values Property

Specifies the values of the enumeration represented by the EnumDescriptor.

Namespace: DevExpress.ExpressApp.Utils

Assembly: DevExpress.ExpressApp.v25.2.dll

NuGet Package: DevExpress.ExpressApp

Declaration

public Array Values { get; }

Property Value

Type Description
Array

A Array object representing the values of the enumeration represented by the EnumDescriptor.

Remarks

The following code snippet illustrates use of the Values property. The code retrieves images and display captions associated with MyEnum enumeration values.

using System.Drawing;
//...
EnumDescriptor myDescriptor = new EnumDescriptor(typeof(MyEnum));
foreach(object enumValue in myDescriptor.Values) {
    string caption = myDescriptor.GetCaption(enumValue);
    var image = myDescriptor.GetImageInfo(enumValue).Image;
    //process caption and image
}

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the Values property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

See Also