how to define a input in EA that has a menu of 1 to 30 as days in each month in a fast way?

 

is there a fast way for having a menu of numbers from 1 to 31/30 for having them in the input part of the EA without writing them down one by one by typing them?

I mean I can do this the hard way:

enum DaysOfEachMonth{

   one=1,

   two=2,

three=3,

....

thirty=30, 

}; 

but is there a faster way for achieving this? 

 
sd2000sd:

is there a fast way for having a menu of numbers from 1 to 31/30 for having them in the input part of the EA without writing them down one by one by typing them?

I mean I can do this the hard way:

enum DaysOfEachMonth{

   one=1,

   two=2,

three=3,

....

thirty=30, 

}; 

but is there a faster way for achieving this? 

Probably not much harder than writing your post! You're already over 10% finished! You might be abke to use a timedate and then isolate the days. Or even why note just use a ushort or int? Why it has to be a menu?
 
sd2000sd:

is there a fast way for having a menu of numbers from 1 to 31/30 for having them in the input part of the EA without writing them down one by one by typing them?

I mean I can do this the hard way:

enum DaysOfEachMonth{

   one=1,

   two=2,

three=3,

....

thirty=30, 

}; 

but is there a faster way for achieving this? 

A faster way, since new values will be formed automatically:

enum DaysOfEachMonth{
   one=1,
   two,
   three,
   ...
   thirty 
}; 
 
figurelli:

A faster way, since new values will be formed automatically:

Just to clarify, you may omit the "=2" from the "two=2" line and the "=3" from the "three=3" line etc. but you still have to fill in manually all the lines that the "..." line represents in Figs example. And you may not omit the "=1" from the "one=1" otherwise "one" will take on a default value of 0.

 
bendex77:

Just to clarify, you may omit the "=2" from the "two=2" line and the "=3" from the "three=3" line etc. but you still have to fill in manually all the lines that the "..." line represents in Figs example. And you may not omit the "=1" from the "one=1" otherwise "one" will take on a default value of 0.

Thanks, as show the source code example.

Anyway, note that this is not a critic of your answer (that is right too), just a way to show how to do it faster, as asked for by sd2000sd.

 
figurelli:

Thanks, as show the source code example.

Anyway, note that this is not a critic of your answer (that is right too), just a way to show how to do it faster, as asked for by sd2000sd.

how about only having numbers from 1 to 30:

1,

2,

...,

30

 

is there a faster way?or should I type them all? 

 
sd2000sd:

how about only having numbers from 1 to 30:

1,

2,

...,

30

 

is there a faster way?or should I type them all? 

You can't name each selection a number like that, gotta spell it or name it d1,d2,d3.