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

Python Kivy ListView: How to delete selected ListItemButton? -

asp.net mvc 4 - A specified Include path is not valid. The EntityType '' does not declare a navigation property with the name '' -