Click or drag to resize

EnumHelperToString Method (Enum, ResourceManager, CultureInfo)

Returns a string value representing the specified enum value. If the enum value has the LocalizedDescriptionAttribute applied, its parameters are used to generate the string value. If those parameters do not result in a valid string value or the attribute is not applied, the enum value is tested for the DescriptionAttribute. If that attribute is applied, the Description field is used as the string value.
If the DescriptionAttribute is not applied or does not result in a valid string value, the enum value is tested for the EnumMemberAttribute. If that attribute is applied, the Value field is used as the string value.
If none of the attributes are applied or result in a valid string value, the default ToString method is used.

Namespace:  Enkoni.Framework
Assembly:  Enkoni.Framework (in Enkoni.Framework.dll) Version: 1.3.0.1
Syntax
public static string ToString(
	Enum enumValue,
	ResourceManager resources,
	CultureInfo culture
)

Parameters

enumValue
Type: SystemEnum
The enum value that must be converted into a string value.
resources
Type: System.ResourcesResourceManager
The resource manager that must be used to retrieve the localized string.
culture
Type: System.GlobalizationCultureInfo
The CultureInfo object that represents the culture for which the resource is localized. Note that if the resource is not localized for this culture, the lookup will fall back using the culture's Parent property, stopping after looking in the neutral culture. If this value is , the CultureInfo is obtained using the culture's CurrentUICulture property.

Return Value

Type: String
The string representation of the enum value.
See Also