Sometimes it can be helpful to get an Enum value from a string, for example if a param is passed as a string that represents an enumerator. Here is an example of how to do this:public enum DocType : int
{
ddefault = 1,
dnobody,
dlong,
dshort
}Now in our code we can do something like:// this is string enumerator name
string doc_type = "dnobody";