Keysight Pathwave 89600 VSA .NET API
GetValueOrDefault Method
See Also 
Agilent.SA.Vsa.Interfaces Assembly > Agilent.SA.Vsa Namespace > CapabilityReadOnlyDictionary Class : GetValueOrDefault Method


key
The key of the value to get.
defaultValue
The default value to return when the dictionary cannot find a value associated with the specified key.

Glossary Item Box

Gets the value associated with the specified key or a default value if the key is not found.

Syntax

Visual Basic (Declaration) 
Public Function GetValueOrDefault( _
   ByVal key As String, _
   ByVal defaultValue As String _
) As String
C# 
public string GetValueOrDefault( 
   string key,
   string defaultValue
)
C++/CLI 
public:
String^ GetValueOrDefault( 
   String^ key,
   String^ defaultValue
) 

Parameters

key
The key of the value to get.
defaultValue
The default value to return when the dictionary cannot find a value associated with the specified key.

Return Value

When the method is successful, the returned value is the value associated with the specified key. When the method fails, it returns defaultValue.

Requirements

Target Platforms: Windows 11 Professional or Enterprise; Windows 10 Professional, Enterprise, or Education (64-bit)

See Also