Sdílet prostřednictvím


PropertySettingsHelper.TryGetValue<T> Method

Definition

TryGetValue pattern extension

public:
generic <typename T>
[System::Runtime::CompilerServices::Extension]
 static bool TryGetValue(Microsoft::VisualStudio::Workspace::IPropertySettings ^ settings, System::String ^ key, [Runtime::InteropServices::Out] T % value);
public static bool TryGetValue<T> (this Microsoft.VisualStudio.Workspace.IPropertySettings settings, string key, out T value);
static member TryGetValue : Microsoft.VisualStudio.Workspace.IPropertySettings * string * 'T -> bool
<Extension()>
Public Function TryGetValue(Of T) (settings As IPropertySettings, key As String, ByRef value As T) As Boolean

Type Parameters

T

Desired type expected

Parameters

settings
IPropertySettings

The setting instance

key
String

Key to look for in the configuration

value
T

The value in the setting entry

Returns

true if key was found

Applies to