Converts a string to an enumeration using a converter.
Namespace: Microsoft.VisualStudio.Package
Assembly: MPF.Project.NonShipping (in MPF.Project.NonShipping.dll)
Syntax
'宣言
<CLSCompliantAttribute(False)> _
Public Shared Function ConvertFromType(Of T As {Structure, New}) ( _
value As String, _
culture As CultureInfo _
) As Nullable(Of T)
'使用
Dim value As String
Dim culture As CultureInfo
Dim returnValue As Nullable(Of T)
returnValue = Utilities.ConvertFromType(value, _
culture)
[CLSCompliantAttribute(false)]
public static Nullable<T> ConvertFromType<T>(
string value,
CultureInfo culture
) where T : struct, new()
[CLSCompliantAttribute(false)]
public:
generic<typename T>
where T : value class, gcnew()
static Nullable<T> ConvertFromType(
String^ value,
CultureInfo^ culture
)
JScript does not support generic types or methods.
Type Parameters
- T
Parameters
value
Type: System.StringThe string to convert.
culture
Type: System.Globalization.CultureInfoThe CultureInfo of the string.
Return Value
Type: System.Nullable<T>
[T:System.Nullable<T>] where T is an enumeration.
Permissions
- 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.