Bagikan melalui


DtsProperty.SetExport(Object, Boolean) Metode

Definisi

Mengatur bendera ekspor untuk objek yang ditentukan.

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)

Parameter

o
Object

Objek tempat bendera sedang diatur.

export
Boolean

Nilai Boolean untuk diatur pada bendera ekspor objek.

Contoh

Contoh berikut menunjukkan pembuatan paket baru dan variabel, var, ditambahkan ke Variables koleksi yang dimiliki oleh Package. Variable memiliki koleksi Properti, serta beberapa objek lainnya, dan contoh ini menunjukkan metode yang SetExport diatur untuk variabel .

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…  

Berlaku untuk