public static string GetDescription(this ChannelGroupsEnum val) { DescriptionAttribute[] attributes = (DescriptionAttribute[])val.GetType().GetField(val.ToString()).GetCustomAttributes(typeof(DescriptionAttribute), false); return(attributes.Length > 0 ? attributes[0].Description : val.ToString()); }
private ChannelGroup(ChannelGroupsEnum @enum) { this.GroupName = @enum.ToString(); }