Show / Hide Table of Contents

Class EnumExtensions

Enum extensions.

Inheritance
object
EnumExtensions
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: Microsoft.GNS.Roster.Extensions
Assembly: Microsoft.XboxStudios.SQTech.Roster.Common.dll
Syntax
public static class EnumExtensions

Methods

View Source

GetDescription<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.

View Source

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.

  • View Source
In this article
Back to top Generated by DocFX