Reference.Culture 属性

获取引用的区域性字符串。 只读。

命名空间:  VSLangProj
程序集:  VSLangProj(在 VSLangProj.dll 中)

语法

声明
ReadOnly Property Culture As String
string Culture { get; }
property String^ Culture {
    String^ get ();
}
abstract Culture : string
function get Culture () : String

属性值

类型:System.String
返回值取决于引用类型。

引用类型

返回的值

程序集

“区域性”字符串。例如,“EN-US”代表“美国英语”。

COM

区域设置 ID。该字符串是引用的类型库的十六进制区域设置 ID。例如,“0”代表多语言,“409”代表“美国英语”。

备注

区域性信息包括语言和日历规范。 有关有效字符串的信息,请参见 CultureInfo

示例

' Macro Editor
Imports VSLangProj
Public Sub DisplayCultures()
   ' The first project is a Visual Basic or C# project.
   Dim vsProject As VSProject = _
        CType(DTE.Solution.Projects.Item(1).Object, VSProject)
   Dim aRef As Reference
        
   For Each aref In vsProject.References
      MsgBox(aRef.Name & " " & aRef.Culture)
   Next
End Sub

.NET Framework 安全性

请参见

参考

Reference 接口

VSLangProj 命名空间