Freigeben über


IVsSettingsStore.GetBoolOrDefault Method

Returns a boolean type property value or a specified default value.

Namespace:  Microsoft.VisualStudio.Shell.Interop
Assemblies:   Microsoft.VisualStudio.Shell.12.0 (in Microsoft.VisualStudio.Shell.12.0.dll)
  Microsoft.VisualStudio.Shell.Interop.10.0 (in Microsoft.VisualStudio.Shell.Interop.10.0.dll)

Syntax

'Declaration
Function GetBoolOrDefault ( _
    collectionPath As String, _
    propertyName As String, _
    defaultValue As Integer, _
    <OutAttribute> ByRef value As Integer _
) As Integer
int GetBoolOrDefault(
    string collectionPath,
    string propertyName,
    int defaultValue,
    out int value
)
int GetBoolOrDefault(
    [InAttribute] String^ collectionPath, 
    [InAttribute] String^ propertyName, 
    [InAttribute] int defaultValue, 
    [OutAttribute] int% value
)
abstract GetBoolOrDefault : 
        collectionPath:string * 
        propertyName:string * 
        defaultValue:int * 
        value:int byref -> int
function GetBoolOrDefault(
    collectionPath : String, 
    propertyName : String, 
    defaultValue : int, 
    value : int
) : int

Parameters

  • collectionPath
    Type: String

    [in] The path of the collection.

  • propertyName
    Type: String

    [in] The property name.

  • defaultValue
    Type: Int32

    [in] The default value to return if the property is not set.

  • value
    Type: Int32%

    [out] The value.

Return Value

Type: Int32
Returns S_OK if the property was returned, S_FALSE if the property does not exist or E_INVALIDARG if the property type is not boolean.

Remarks

If the property was stored as a signed or unsigned integer value, then regular C++ type casting semantics are applied on the output value.

.NET Framework Security

See Also

Reference

IVsSettingsStore Interface

Microsoft.VisualStudio.Shell.Interop Namespace