i have a problem setting the value od an enumeration.
In my code I define this enumeration:
public enum PartType
{
Application,
Operating_System,
Hardware
}
public PartType Part { get; set; }
Then, in the same class I try to set a value of this eumeration in this way (how I have read on the C# documentation):
if (row["part"] == "a")
{
Part.Application;
}
But it signed as error. Why? What am I missing? How can I solve?
Sumit Kesarwani
29-Sep-2014It should be :
Part = PartType.Application;