PackageUtilities.SetStringValueFromConvertedEnum<T> Generic Method

Returns a string from an enumeration value.

Namespace:  Microsoft.VisualStudio.Shell
Assembly:  Microsoft.VisualStudio.Shell (in Microsoft.VisualStudio.Shell.dll)

Syntax

'宣言
<CLSCompliantAttribute(False)> _
Public Shared Function SetStringValueFromConvertedEnum(Of T As {Structure, New}) ( _
    enumValue As T, _
    culture As CultureInfo _
) As String
'使用
Dim enumValue As T
Dim culture As CultureInfo
Dim returnValue As String

returnValue = PackageUtilities.SetStringValueFromConvertedEnum(enumValue, _
    culture)
[CLSCompliantAttribute(false)]
public static string SetStringValueFromConvertedEnum<T>(
    T enumValue,
    CultureInfo culture
) where T : struct, new()
[CLSCompliantAttribute(false)]
public:
generic<typename T>
where T : value class, gcnew()
static String^ SetStringValueFromConvertedEnum(
    T enumValue, 
    CultureInfo^ culture
)
JScript does not support generic types or methods.

Type Parameters

  • T

Parameters

  • enumValue
    Type: T

    The enumeration value.

Return Value

Type: System.String

A string value derived from the enumeration.

Remarks

The type parameter used should be an enumeration for which there is a subtype of EnumConverter.

Permissions

See Also

Reference

PackageUtilities Class

PackageUtilities Members

Microsoft.VisualStudio.Shell Namespace