<xml> </xml>

SOLIDWORKS PDM Professional API Help | Send Feedback
LongTestAndSetAt Method (IEdmDictionary5)
See Also Example

Collapse All Expand All Language Filter: All Language Filter: Multiple Language Filter: Visual Basic Language Filter: C# Language Filter: C++/CLI

EPDM.Interop.epdm Namespace > IEdmDictionary5 Interface : LongTestAndSetAt Method (IEdmDictionary5)

Visual Basic
C#
C++/CLI

lKey
  Key for which to set a value

bsValue
  New value

Creates the specified integer key if it does not exist and sets its value.

# Syntax

Visual Basic |
--- | ---

    Function LongTestAndSetAt( _
       ByVal lKey As System.Integer, _
       ByVal bsValue As System.String _
    ) As System.Boolean

C# |
--- | ---

    System.bool LongTestAndSetAt(
       System.int lKey,
       System.string bsValue
    )

C++/CLI |
--- | ---

    System.bool LongTestAndSetAt(
    &   System.int lKey,
    &   System.String^ bsValue
    )

#### Parameters

lKey
  Key for which to set a value
bsValue
  New value

#### Return Value

True if the value of a new key is successfully set, false otherwise

# Example

Get and Set Dictionary Key-Value Pairs (VB.NET)
Get and Set Dictionary Key-Value Pairs (C#)

# Remarks

The testing and the setting are both performed in a single operation. A test-and-set function like this can be useful if you need a semaphore to synchronize several clients accessing the same data.

Return codes:

- S_OK: The method successfully executed.
- S_FALSE: One of the arguments is invalid.

# See Also

####

IEdmDictionary5 Interface
IEdmDictionary5 Members
IEdmDictionary5::StringTestAndSetAt Method ()
IEdmDictionary5::LongSetAt Method ()

# Availability

SOLIDWORKS PDM Professional Version 5.2