How to parse enum from a string ?

Vinod K Chandran kcvinu82 at gmail.com
Wed May 27 17:33:33 UTC 2020


Hi all,
Assume that i have an enum like this.
enum TestEnum  {
     Received = 1,
     Started ,
     Finished ,
     Sent
}

I am saving this enum values as string in database. So, when i 
retrieve them from the database, how can i parse the string into 
TestEnum ? In vb. net, i can use
[Enum].Parse(GetType( TestEnum), "Started")
How to do this in D ?


More information about the Digitalmars-d-learn mailing list