c# - extending enum property from referenced dll -


this question has answer here:

inside mvc4 have model

public class myviewmodel {     public someenum myenum { get; set; }     public string name { get; set; } } 

this someenum located in other dll referenced web app. cannot change dll (someenum) further clarity want use enum (someenum) little extension, want add few more enum properties.

how can done?

it cannot, basically.

all can declare new enum, perhaps same name in difference namespace, perhaps different name:

namespace my.local {     public enum someenum {         // originals         = the.other.someenum.a,         b = the.other.someenum.b,         c = the.other.someenum.c,         // extras         d, e, f     } } 

Comments

Popular posts from this blog

php - Submit Form Data without Reloading page -

linux - Rails running on virtual machine in Windows -