LanguagePreferences.GetIntegerValue Method
Gets an integer value from the specified registry entry.
Namespace: Microsoft.VisualStudio.Package
Assemblies: Microsoft.VisualStudio.Package.LanguageService.10.0 (in Microsoft.VisualStudio.Package.LanguageService.10.0.dll)
Microsoft.VisualStudio.Package.LanguageService.11.0 (in Microsoft.VisualStudio.Package.LanguageService.11.0.dll)
Microsoft.VisualStudio.Package.LanguageService.9.0 (in Microsoft.VisualStudio.Package.LanguageService.9.0.dll)
Microsoft.VisualStudio.Package.LanguageService (in Microsoft.VisualStudio.Package.LanguageService.dll)
Syntax
'Declaración
Public Function GetIntegerValue ( _
key As RegistryKey, _
name As String, _
def As Integer _
) As Integer
public int GetIntegerValue(
RegistryKey key,
string name,
int def
)
Parameters
- key
Type: Microsoft.Win32.RegistryKey
[in] The RegistryKey object representing the desired registry subkey.
- name
Type: System.String
[in] The name of the registry entry for which to get the value.
- def
Type: System.Int32
[in] The default value to use if the registry entry is not found.
Return Value
Type: System.Int32
The integer value stored in the registry entry if the registry entry exists, otherwise def if the registry entry does not exist. If the registry entry is a string, then the string is evaluated as a number.
Remarks
This is a helper method used for obtaining numerical values from the registry. It is typically called from InitMachinePreferences.
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.