Code: Select all
///
/// This is my type
///
public enum Test : int
{
///
/// Value A
///
[Display(Name="The First Value")]
A = 1,
///
/// Value B
///
[Display(Name="The Second Value")]
B = 2,
///
/// This is the third value
///
[Display(Name="The Third Value")]
C = 3
}
- DisplayName : System.String
Documentation : System.String
Code: Select all
Code: Select all
// enum type members
if (enumType.Members.Count > 0) {
foreach (EnumTypeMember member in enumType.Members) {
#>
[Display(Name="")]
<# // --- COPY TO HERE ---
if (GenerateDataContracts && (bool)member.GetProperty("GenerateEnumMemberAttribute")) {
Hope this is useful to others
