Udostępnij za pośrednictwem


Metoda IVsWritableSettingsStore.GetIntOrDefault — (String, String, Int32, Int32)

 

Zwraca właściwość typu integer lub określona wartość domyślna.

Przestrzeń nazw:   Microsoft.VisualStudio.Shell.Interop
Zestaw:  Microsoft.VisualStudio.Shell.Interop.10.0 (w Microsoft.VisualStudio.Shell.Interop.10.0.dll)

Składnia

int GetIntOrDefault(
    string collectionPath,
    string propertyName,
    int defaultValue,
    out int value
)
int GetIntOrDefault(
    String^ collectionPath,
    String^ propertyName,
    int defaultValue,
    [OutAttribute] int% value
)
abstract GetIntOrDefault : 
        collectionPath:string *
        propertyName:string *
        defaultValue:int *
        value:int byref -> int
Function GetIntOrDefault (
    collectionPath As String,
    propertyName As String,
    defaultValue As Integer,
    <OutAttribute> ByRef value As Integer
) As Integer

Parametry

  • collectionPath
    [w] Ścieżka kolekcji.
  • propertyName
    [w] Nazwa właściwości.
  • defaultValue
    [w] Aby powrócić, jeśli właściwość nie jest ustawiona wartość domyślna.
  • value
    [out] Wartość.

Wartość zwracana

Type: System.Int32

Zwraca S_OK , jeśli właściwość został zwrócony, S_FALSE , jeśli właściwość nie istnieje lub F:Microsoft.VisualStudio.E_INVALIDARG , jeśli typ właściwości nie jest liczbą całkowitą.

Implementuje

IVsSettingsStore.GetIntOrDefault(String, String, Int32, Int32)

Uwagi

Jeśli właściwość była przechowywana jako wartość bez znaku, regularne semantykę rzutowanie typu C++ są stosowane na wartość danych wyjściowych.

Zobacz też

Interfejs IVsWritableSettingsStore
Przestrzeń nazw Microsoft.VisualStudio.Shell.Interop

Powrót do początku