VistaDB 6
VistaDB.Diagnostic Namespace / Errors Class / TryGetValue Method
The key of the value to get.
When this method returns, contains the value associated with the specified key, if the key is found; otherwise, the default value for the type of the value parameter. This parameter is passed uninitialized.


In This Topic
    TryGetValue Method (Errors)
    In This Topic
    Gets the value associated with the specified key.
    Syntax
    'Declaration
     
    
    <__DynamicallyInvokableAttribute()>
    Public Function TryGetValue( _
       ByVal key As System.Integer, _
       ByRef value As System.String _
    ) As System.Boolean
    'Usage
     
    
    Dim instance As Errors
    Dim key As System.Integer
    Dim value As System.String
    Dim value As System.Boolean
     
    value = instance.TryGetValue(key, value)
    [__DynamicallyInvokable()]
    public System.bool TryGetValue( 
       System.int key,
       out System.string value
    )

    Parameters

    key
    The key of the value to get.
    value
    When this method returns, contains the value associated with the specified key, if the key is found; otherwise, the default value for the type of the value parameter. This parameter is passed uninitialized.

    Return Value

    true if the System.Collections.Generic.Dictionary`2 contains an element with the specified key; otherwise, false.
    Exceptions
    ExceptionDescription
    key is a null reference (Nothing in Visual Basic).
    Requirements

    Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

    See Also