VCProjectReference.Culture Propriedade

Definição

Obtém a cultura para a referência selecionada.

public:
 property System::String ^ Culture { System::String ^ get(); };
public:
 property Platform::String ^ Culture { Platform::String ^ get(); };
[System.Runtime.InteropServices.DispId(2006)]
public string Culture { [System.Runtime.InteropServices.DispId(2006)] get; }
[<System.Runtime.InteropServices.DispId(2006)>]
[<get: System.Runtime.InteropServices.DispId(2006)>]
member this.Culture : string
Public ReadOnly Property Culture As String

Valor da propriedade

String

Um valor enumResourceLangID.

Implementações

Atributos

Exemplos

Consulte como compilar código de exemplo para extensibilidade de modelo de projeto para obter informações sobre como compilar e executar este exemplo.

O código de exemplo a seguir lista o Culture valor da propriedade para cada referência no projeto:

[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  

Aplica-se a