enum ability controlling conflicts


when controlling category an enum property, wholly gets controlling dispute between ability name enum type. example:



enum day{ monday, tuesday, ... }

class mydateclass
{
private day;

open day{ get{ relapse day; } }
}


since wholly flags enums should have plural names, controlling enum "days" proceed non-flag enum. above instance mutation "weekday" presumably enum property. nonetheless whole box there good variations finish adult controlling properties "foomode" "barkind" an vigilant enum properties foo bar type. elegant.



how wholly name enums properties scenario?






thanks discerning responses. another question: since permitted nest open enums, solve controlling issues wish nest open enums?



class vehicle
{
enum kind{ car, bike }

open kind kind{ get{ relapse ... } }
}

class meal
{
enum kind{ dessert, maincourse }

open kind kind{ get{ relapse ... } }
}


in unfolding above, given dish car share same namespace, i can't pierce "kind" outmost presumably classes but renaming mealkind vehiclekind respectively. i feeling



myvehicle.kind = vehicle.kind.car


but guidlines recommend. best use here? never nested open enums instead name vehiclekind 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