LanguagePreferences.GetIntegerValue 方法

从指定的注册表项获取整数值。

命名空间:  Microsoft.VisualStudio.Package
程序集:   Microsoft.VisualStudio.Package.LanguageService.10.0(在 Microsoft.VisualStudio.Package.LanguageService.10.0.dll 中)
  Microsoft.VisualStudio.Package.LanguageService.11.0(在 Microsoft.VisualStudio.Package.LanguageService.11.0.dll 中)
  Microsoft.VisualStudio.Package.LanguageService.9.0(在 Microsoft.VisualStudio.Package.LanguageService.9.0.dll 中)
  Microsoft.VisualStudio.Package.LanguageService(在 Microsoft.VisualStudio.Package.LanguageService.dll 中)

语法

声明
Public Function GetIntegerValue ( _
    key As RegistryKey, _
    name As String, _
    def As Integer _
) As Integer
public int GetIntegerValue(
    RegistryKey key,
    string name,
    int def
)

参数

  • name
    类型:System.String
    [in] 注册表项的名称获取值。
  • def
    类型:System.Int32
    [in] 使用的默认值,如果找不到注册表项。

返回值

类型:System.Int32
在注册表项,如果注册表项存在,否则 def 存储的整数值,如果注册表项不存在。如果注册表项是一个字符串,该字符串会计算为数字。

备注

这是从注册表中数值的帮助器使用的方法。它从 InitMachinePreferences通常会调用。

.NET Framework 安全性

请参见

参考

LanguagePreferences 类

Microsoft.VisualStudio.Package 命名空间