I would like to change in an existing content one condition to a little bit more flexible and struggel here.:
the original looks like:
if (object.dayofweek == DayOfWeek.Tuesday)
{
}
my first approach was to replace Tuesday by an integer, but this fails. Then I've tried to use:
if (object.dayofweek == Enum.GetName(typeof(DayOfWeek), 2))
{
}
does not work.
Any hint, how I can replace the fixed day by an variable? Thanks!