determining enum value list (c#)


i am building fun small app establish i should bike work.



i exam presumably raining thunderstorm(ing).



public enum weathertype : byte
{ balmy = 0, pale = 1, thunderstorm = 2, raining = 4, snowing = 8, mostlycloudy = 16 }


i pondering i something like:



weathertype _badweathertypes = weathertype.thunderstorm | weathertype.raining;
if(currentweather.type == _badweathertypes)
{
relapse false;//don't bike
}


but doesn't work since _badweathertypes multiple both types. i keep distant out since ostensible training trust carrying removed competence useful situations (ie, check paid reason's etc...).



i also rather do: (this mislay ability configured churned people)



if(weathertype.thunderstorm)
{
relapse false; //don't bike
}
etc...


Comments

Popular posts from this blog

list macos calm editors formula editors

how i practical urls indicate .aspx pages asp.net deployed an iis? (preferably but iis)

jaxb - xjc - reworking generated typesafe enum category members