Condividi tramite


Proprietà VCAssemblyReference.Culture

ottiene le impostazioni cultura per il riferimento selezionato.

Spazio dei nomi:  Microsoft.VisualStudio.VCProjectEngine
Assembly:  Microsoft.VisualStudio.VCProjectEngine (in Microsoft.VisualStudio.VCProjectEngine.dll)

Sintassi

'Dichiarazione
ReadOnly Property Culture As String
string Culture { get; }
property String^ Culture {
    String^ get ();
}
abstract Culture : string with get
function get Culture () : String

Valore proprietà

Tipo: System.String
In enumResourceLangID valore.

Note

vedere Procedura: compilare codice di esempio per l'Extensibility del modello di progetto per informazioni su come compilare ed eseguire l'esempio.

Esempi

[Visual Basic]

i seguenti elenchi di codice di esempio Culture valore della proprietà per ogni riferimento nel progetto:

' Add a reference to Microsoft.VisualStudio.VCProjectEngine.
' This example 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

Sicurezza di .NET Framework

Vedere anche

Riferimenti

VCAssemblyReference Interfaccia

Spazio dei nomi Microsoft.VisualStudio.VCProjectEngine