I am using sqlDatareader to read and assign variable value. The variable datatype is string.
string displayUnits = dr["DisplayUnits"].ToString(); // the variable value "DisplayUnitType.DUT_GENERAL"
Variable value is used to assign formatOptions.DisplayUnits.
formatOptions.DisplayUnits = displayUnits;
However, I am getting an error message cannot implicitly convert type string to Autodesk.Revit.BD.DisplayUnitType. I know I assigned a value to another type. 
How do I casting and type conversions?
 
     
    