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 hibernate @any-related annotations?

why does floated <input> control floated component slip over too distant right ie7, nonetheless firefox?