I have an enum
public enum ProductionStatus {
Received = 000,
Validated = 010,
PlannedAndConverted = 020,
InProduction = 030,
QAChecked
In general there is an Enum Class that contains an array of methods facilitating the work with enums.
Here, if you want to cast enumerable value to integer or other type, you can write:
int validatedAsInt = (int) ProductionStatus.Validated
validatedAsInt will contain value of ProductionStatus.Validated.
If you want to obtain numbers like "010" you can write:
string validatedAsString = ((int) ProductionStatus.Validated).ToString("000");
Or:
string validatedAsString = ((int) ProductionStatus.Validated).ToString("D3");
validatedAsString will contain "010".