I have a propertygrid which I need to create a combobox inside the propertygrid and display int value (1 to 9), I found using enum is the easiest way, but enum couldn't display int value, even I try to cast it to int, but I do not know how to return all the value. Any other way to do this? Thanks in Advance. Below is my code.
public class StepMode
{
private TotalSteps totalSteps;
public TotalSteps totalsteps
{
get { return totalSteps; }
set { value = totalSteps; }
}
public enum TotalSteps
{
First = 1,
Second = 2,
Three = 3,
Four = 4,
Five = 5,
Six = 6,
Seven = 7,
Eight = 8,
Nine = 9
}
}
int steps = (int)TotalSteps.First
? – Backstroke