ToDescription Method

Glimpse API

EnumExtensions ToDescription Method Glimpse API Documentation
Converts an OnlineEnum value to a string if it is annotated with a OnlineDescriptionAttribute.

Namespace: Glimpse.Core.Extensions
Assembly: Glimpse.Core (in Glimpse.Core.dll) Version: 1.0.1.0 (1.0.1)

Syntax

public static string ToDescription(
	this Enum enumeration
)
public static string ToDescription(
	this Enum enumeration
)

Parameters

enumeration
Type: OnlineSystem Enum
The enumeration.

Return Value

The OnlineDescriptionAttribute string of the corresponding OnlineEnum member, or an empty string if no OnlineDescriptionAttribute is present.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type OnlineEnum. When you use instance method syntax to call this method, omit the first parameter. For more information, see OnlineExtension Methods (Visual Basic) or OnlineExtension Methods (C# Programming Guide).
See Also