You are misleading a field with an enumeration type with the enumeration type itself. Your code is about as useful as string="bla" .
public enum OVType { OVLH, OVLL } public class LUOverVoltage { public string Name { get; set; } public OVType OVType { get; set; }
Declares a type named OVType and a property with the same name. Your code should now work.
As a side note, both your type names and property names violate .net naming conventions.
I would name the enumeration type OverVoltKind and the property is just Kind .
source share