Class EnumExtensions
Enum extensions.
Inherited Members
Namespace: Microsoft.GNS.Roster.Extensions
Assembly: Microsoft.XboxStudios.SQTech.Roster.Common.dll
Syntax
public static class EnumExtensions
Methods
View SourceGetDescription<T>(T)
Gets the value of the DescriptionAttribute for an enum.
Declaration
public static string GetDescription<T>(this T e) where T : IConvertible
Parameters
| Type | Name | Description |
|---|---|---|
| T | e | The enum in which to get the description attribute. |
Returns
| Type | Description |
|---|---|
| string | The description value. |
Type Parameters
| Name | Description |
|---|---|
| T | The enum type. |
GetFieldDisplayName<T>(T)
Gets the value of the FieldDisplayNameAttribute for an enum.
Declaration
public static string GetFieldDisplayName<T>(this T e) where T : IConvertible
Parameters
| Type | Name | Description |
|---|---|---|
| T | e | The enum in which to get the display name attribute. |
Returns
| Type | Description |
|---|---|
| string |
Type Parameters
| Name | Description |
|---|---|
| T | The enum type. |