Condividi tramite


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

Try to convert a string into the given type, no exception is thrown.

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

Syntax

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

Type Parameters

  • T
    Type to convert to.

Parameters

  • result
    Type: T%
    Converted result. The value is unspecified if the conversion fails.

Return Value

Type: System.Boolean
True if conversion succeeds, false otherwise.

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