using System.ComponentModel.DataAnnotations;
public static void Main()
var names = Enum.GetNames(typeof(Countries)).ToList();
foreach( var name in names )
names = Enum.GetValues<Countries>().Select(v => v.GetDisplayName()).ToList();
foreach( var name in names )
[Display(Name="New Zealand")]
public static class CountriesExtensions
public static string GetDisplayName(this Countries enumValue)
return enumValue.GetType()
.GetMember(enumValue.ToString())
.GetCustomAttribute<DisplayAttribute>()
?.GetName() ?? enumValue.ToString();