Configuration.PlatformName Eigenschaft

Definition

Ruft den Namen der Plattform ab, die von dieser Zuweisung unterstützt wird.

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

Eigenschaftswert

String

Eine Zeichenfolge, die den Namen der Plattform darstellt, die von dieser Zuweisung unterstützt wird.

Attribute

Beispiele

public void CodeExample(DTE2 dte, AddIn addin)  
{   // Make sure you have a solution loaded into Visual Studio  
    // before running the following example.  
    try  
    {  
        Project prj;  
        Configuration config;   
        OutputGroups outPGs;  
        Properties props;  
        if (dte.Solution.Projects.Count > 0)  
        {  
            prj = dte.Solution.Projects.Item(1);  
            config = prj.ConfigurationManager.ActiveConfiguration;  
            // Return a collection of OutputGroup objects that contain  
            // the names of files that are outputs for the project.  
            outPGs = config.OutputGroups;  
            MessageBox.Show(outPGs.Count.ToString());  
            // Returns the project for the config.  
            MessageBox.Show(((Project)config.Owner).Name);  
            // Returning the platform name for the Configuration.  
            MessageBox.Show(config.PlatformName);  
            // Returning all properties for Configuration object.  
            props = config.Properties;  
            string p = "";  
            foreach (Property prop in props)  
            {  
                p = p + prop.Name + "\n";  
            }  
            MessageBox.Show(p);  
        }  
    }  
    catch(Exception ex)  
    {  
        MessageBox.Show(ex.Message);  
    }  
}  

Hinweise

Wenn das Projekt keine Plattformen unterstützt, wird PlatformName eine leere Zeichenfolge zurückgegeben.

Gilt für