PropertyCollection::TryGetProperty<TProperty> Method (Object^, TProperty)

 

Gets the property associated with the specified key.

Namespace:   Microsoft.VisualStudio.Utilities
Assembly:  Microsoft.VisualStudio.CoreUtility (in Microsoft.VisualStudio.CoreUtility.dll)

public:
generic<typename TProperty>
bool TryGetProperty(
	Object^ key,
	[OutAttribute] TProperty% property
)

Parameters

key
Type: System::Object^

The key.

property
Type: TProperty

The retrieved property, or default(TValue) if there is no property associated with the specified key.

Return Value

Type: System::Boolean

true if the property was found, otherwise false.

Type Parameters

TProperty

The type of the property associated with the specified key.

Exception Condition
ArgumentNullException

key is null.

Return to top
Show: