I have an enum
public enum ProductionStatus {
Received = 000,
Validated = 010,
PlannedAndConverted = 020,
InProduction = 030,
QAChecked = 040,
Delivered = 070,
RejectedOrCancelled = 100
}
I need to get value by key from this enum, for example when choosing ProductionStatus.Validated
it should return 010. How can I do this?
Just to throw another solution in there...
((int)ProductionStatus.Validated).ToString("D3");
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With