Freigeben über


VCConfiguration.CopyTo(Object) Method

Definition

Copies the current configuration.

public:
 void CopyTo(System::Object ^ Config);
public:
 void CopyTo(Platform::Object ^ Config);
void CopyTo(winrt::Windows::Foundation::IInspectable const & Config);
[System.Runtime.InteropServices.DispId(733)]
public void CopyTo (object Config);
[<System.Runtime.InteropServices.DispId(733)>]
abstract member CopyTo : obj -> unit
Public Sub CopyTo (Config As Object)

Parameters

Config
Object

Required. The configuration into which you want to copy the current configuration's settings.

Attributes

Examples

See How to: Compile Example Code for Project Model Extensibility for information about how to compile and run this example.

The following example invokes the CopyTo method in the integrated development environment (IDE):

' add reference to Microsoft.VisualStudio.VCProjectEngine.  
Imports EnvDTE  
Imports Microsoft.VisualStudio.VCProjectEngine  

Public Module Module1  
    Sub Test()  
        Dim prj As VCProject  
        Dim cfgs As IVCCollection  
        Dim cfg, Dest As VCConfiguration  
        Dim Dest_obj As Object  
        prj = DTE.Solution.Projects.Item(1).Object  
        cfgs = prj.Configurations  
        cfg = cfgs.Item("Debug")  
        Dest = cfgs.Item("Release")  
        Dest_obj = Dest  
        cfg.CopyTo(Dest_obj)  
    End Sub  
End Module  

Remarks

This method is useful when you have added a configuration and want to copy the settings from an existing configuration to the new configuration.

Applies to