Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SQL Anywhere 11.0.0 » UltraLite - .NET Programming » UltraLite .NET 2.0 API Reference » ULConnectionStringBuilder class


TryGetValue method

Retrieves a value corresponding to the supplied key from this ULConnectionStringBuilder.

Visual Basic

Public Overrides Function TryGetValue( _
   ByVal keyword As String, _
   ByVal value As Object _
) As Boolean

public override bool TryGetValue(
   string  keyword,
   object value
  • keyword   The key of the item to retrieve.

  • value   The value corresponding to the key.

Return value

True if keyword was found within the connection string, false otherwise.


The TryGetValue method lets developers safely retrieve a value from a ULConnectionStringBuilder without needing to first call the ContainsKey method. Because TryGetValue does not raise an exception when you call it, passing in a nonexistent key, you do not have to look for a key before retrieving its value. Calling TryGetValue with a nonexistent key will place the null value (Nothing in Visual Basic) in the value parameter.

See also