SerializationUtilities.TryGetValue<T> Method (String, T%)

Tries to convert a string into a given type.

Namespace:  Microsoft.VisualStudio.Modeling
Assembly:  Microsoft.VisualStudio.Modeling.Sdk.11.0 (in Microsoft.VisualStudio.Modeling.Sdk.11.0.dll)

Syntax

'Declaration
Public Shared Function TryGetValue(Of T) ( _
    input As String, _
    <OutAttribute> ByRef result As T _
) As Boolean
public static bool TryGetValue<T>(
    string input,
    out T result
)
public:
generic<typename T>
static bool TryGetValue(
    String^ input, 
    [OutAttribute] T% result
)
static member TryGetValue : 
        input:string * 
        result:'T byref -> bool
JScript does not support generic types or methods.

Type Parameters

  • T
    Type to convert to.

Parameters

  • input
    Type: String

    The string to convert.

  • result
    Type: T%

    The type to which convert the string.

Return Value

Type: Boolean
true if the conversion succeeded; otherwise, false.

Remarks

Changed method behaviour 26 July 07 - now rethrows critical exceptions rather than suppressing them.

.NET Framework Security

See Also

Reference

SerializationUtilities Class

TryGetValue Overload

Microsoft.VisualStudio.Modeling Namespace