DtsProperty.SetExport(Object, Boolean) 方法

定義

設定指定物件的匯出旗標。

public:
 void SetExport(System::Object ^ o, bool export);
public void SetExport(object o, bool export);
member this.SetExport : obj * bool -> unit
Public Sub SetExport (o As Object, export As Boolean)

參數

o
Object

旗幟被放置的物件。

export
Boolean

在物件的匯出旗標上設定的布林值。

範例

以下範例展示了建立一個新套件及變數 var,並將其 Variables 加入由 Package擁有的集合中。 A Variable 有一個 Properties 集合,以及其他幾個物件,這個範例展示了 SetExport 該變數所設定的方法。

Package p2 = new Package();  
Variable v = p2.Variables.Add("var", false, "", 1);  
p2.EnableConfigurations = true;  
Configuration c1 = p2.Configurations.Add();  
c1.ConfigurationString = @"c:\conf.ini";  
c1.ConfigurationType = DTSConfigurationType.IniFile;  
v.Properties["Value"].SetExport(v, true);  
// more code here…  
Dim p2 As Package =  New Package()   
Dim v As Variable =  p2.Variables.Add("var",False,"",1)   
p2.EnableConfigurations = True  
Dim c1 As Configuration =  p2.Configurations.Add()   
c1.ConfigurationString = "c:\conf.ini"  
c1.ConfigurationType = DTSConfigurationType.IniFile  
v.Properties("Value").SetExport(v, True)  
' more code here…  

適用於