Compartir a través de


SettingsStore.GetBoolean Method (String, String, Boolean)

Returns the value of the requested property whose data type is [!:SettingsType.Int32] as boolean.

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

Syntax

'Declaration
Public MustOverride Function GetBoolean ( _
    collectionPath As String, _
    propertyName As String, _
    defaultValue As Boolean _
) As Boolean
public abstract bool GetBoolean(
    string collectionPath,
    string propertyName,
    bool defaultValue
)
public:
virtual bool GetBoolean(
    String^ collectionPath, 
    String^ propertyName, 
    bool defaultValue
) abstract
abstract GetBoolean : 
        collectionPath:string * 
        propertyName:string * 
        defaultValue:bool -> bool
public abstract function GetBoolean(
    collectionPath : String, 
    propertyName : String, 
    defaultValue : boolean
) : boolean

Parameters

  • collectionPath
    Type: String

    Path of the collection of the property.

  • propertyName
    Type: String

    Name of the property.

  • defaultValue
    Type: Boolean

    Value to be returned if the property does not exist.

Return Value

Type: Boolean
If the property does not exist, it returns the defaultValue passed in otherwise it returns true if the underling integer value is non-zero and false if it is zero.

Exceptions

Exception Condition
ArgumentException

Throws this exception if the property is of different type.

.NET Framework Security

See Also

Reference

SettingsStore Class

GetBoolean Overload

Microsoft.VisualStudio.Settings Namespace