using attributes cut down enum enum mapping enum/const movement switch statments


i suspect everybody seen formula like:



public vacant server2clientenumconvert( serverenum server)
{
switch(server)
{
box serverenum.one:
relapse clientenum.abc
//and on.


instead crime somthing like:



public enum serverenum
{
[enum2enum(clientenum.abc)]
one,
}


now tact cut by serverenum reworking mappings enum chapter itself.



the problem i am carrying here chapter enum2enum attribute.



this works nonetheless replacing vigilant o enum e does not. i wish means pass objects constructor, wholly enums.



public category enumtoenumattribute : attribute
{
open enumtoenumattribute(object o){}
}


this fails compile.



public category enumtoenumattribute : attribute
{
open enumtoenumattribute(enum e){}
}


is there reason accumulate error? else i pass information indispensable map besides:



enumtoenumattribute(type dest, twine enumstring)


this seems too plain nonetheless wholly proceed following i speculation i it.



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?