c# - IEnumerable list delplayed from enum values -


i have enum class below know how able send enum list of ienumerable dont see number actual name e.g. "monday" on list

 public enum weekdays     {         monday = 1,         tuesday = 2,         wednesday = 3,         thursday = 4,         friday = 5,         saturday = 6,         sunday = 7     } 

you can use enum.getnames() list of names.

string []names =  enum.getnames(typeof(weekdays)); 

Comments

Popular posts from this blog

java - Jmockit String final length method mocking Issue -

asp.net - Razor Page Hosted on IIS 6 Fails Every Morning -

c++ - wxwidget compiling on windows command prompt -