Click or drag to resize
DigitalRuneNamedObjectCollectionTTryGetTExpected Method (String, TExpected)
Gets the object associated with the specified key. The object needs to be of a certain type.

Namespace: DigitalRune.Collections
Assembly: DigitalRune (in DigitalRune.dll) Version: 1.20.0.0 (1.20.1.14552)
Syntax
public bool TryGet<TExpected>(
	string key,
	out TExpected value
)
where TExpected : T

Parameters

key
Type: SystemString
The name of the element to get.
value
Type: TExpected
The object associated with the specified key, if the key is found and the object is of type TExpected; otherwise, the default value for TExpected is returned. (This parameter is passed uninitialized.)

Type Parameters

TExpected
The expected type of the object.

Return Value

Type: Boolean
if the NamedObjectCollectionT contains an element with the specified key which is of the expected type; otherwise, .
See Also