Partager via


Policies.TryGetValue Method

Gets the value associated with the specified key.

Namespace: Microsoft.Web.Services3.Design
Assembly: Microsoft.Web.Services3 (in microsoft.web.services3.dll)

Usage

'Usage
Dim key As String
Dim value As Policy
Dim returnValue As Boolean
Dim policies1 As Policies
returnValue = policies1.TryGetValue(key, value)

Syntax

'Declaration
Public Function TryGetValue( _
    ByVal key As String, _
    <OutAttribute()> ByRef value As Policy _
) As Boolean
public bool TryGetValue(
    string key, 
    out Policy value
);
public:
virtual bool arbitrary-name(
    String^ key,
    [Out] Policy^% value
);
public boolean TryGetValue(
    System.String key, 
    /*out*/Policy value
);
public final function TryGetValue(
     key : String, 
     value : Policy
) : Boolean;

Parameters

  • key
    The key whose value to get.
  • value
    When this method returns, 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 collection contains a policy with the specified key; otherwise, false.

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Platforms

Development Platforms

Windows XP Home Edition, Windows XP Professional, Windows Server 2003, Windows 2000, Windows 2000 Server, Windows 2000 Advanced Server

Target Platforms

See Also

Reference

Policies Class
Policies Members
Microsoft.Web.Services3.Design Namespace