VCProjectReference.Culture 屬性
取得選取參考的文化特性。
命名空間: Microsoft.VisualStudio.VCProjectEngine
組件: Microsoft.VisualStudio.VCProjectEngine (在 Microsoft.VisualStudio.VCProjectEngine.dll 中)
語法
'宣告
ReadOnly Property Culture As String
string Culture { get; }
property String^ Culture {
String^ get ();
}
abstract Culture : string with get
function get Culture () : String
屬性值
型別:System.String
enumResourceLangID 值。
範例
請參閱HOW TO:編譯專案模型擴充性的範例程式碼如需有關如何編譯及執行這個範例資訊。
下列範例程式碼清單Culture在專案中的每個參考的屬性值:
[Visual Basic]
' Add a reference to Microsoft.VisualStudio.VCProjectEngine.
' This sample displays the build number of every file
' referenced in a Visual C++ project. Therefore, make sure
' you have a Visual C++ project with references loaded before
' running this code.
Imports EnvDTE
Imports Microsoft.VisualStudio.VCProjectEngine
Public Module Module1
Sub Test()
Dim proj As Project
Dim vcproj As VCProject
Dim ref As VCReference
On Error Resume Next
' Loop each project in the solution.
For Each proj In DTE.Solution.Projects
vcproj = Nothing
vcproj = CType(proj.Object, VCProject)
' If this is a Visual C++ project.
If Not vcproj Is Nothing Then
' Loop each reference in the Visual C++ project.
For Each ref In vcproj.VCReferences
MsgBox("The culture for the file referenced by '" & _
ref.Name & "' is '" & ref.Culture & "'.")
Next
End If
Next
End Sub
End Module
.NET Framework 安全性
- 完全信任立即呼叫者。這個成員無法供部分信任的程式碼使用。如需詳細資訊,請參閱從部分受信任程式碼使用程式庫。