PackageUtilities.SetStringValueFromConvertedEnum<T> Method
Returns a string from an enumeration value.
This API is not CLS-compliant. The CLS-compliant alternative is [None].
Namespace: Microsoft.VisualStudio.Shell
Assemblies: Microsoft.VisualStudio.Shell.9.0 (in Microsoft.VisualStudio.Shell.9.0.dll)
Microsoft.VisualStudio.Shell (in Microsoft.VisualStudio.Shell.dll)
Microsoft.VisualStudio.Shell.10.0 (in Microsoft.VisualStudio.Shell.10.0.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
)
[<CLSCompliantAttribute(false)>]
static member SetStringValueFromConvertedEnum :
enumValue:'T *
culture:CultureInfo -> string when 'T : struct, new()
JScript does not support generic types or methods.
Type Parameters
- T
Parameters
- enumValue
Type: T
The enumeration value.
- culture
Type: System.Globalization.CultureInfo
The CultureInfo of the string.
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.
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.