DtsProperty.SetExport Method (Object, Boolean)
Sets the export flag for the specified object.
Assembly: Microsoft.SqlServer.ManagedDTS (in Microsoft.SqlServer.ManagedDTS.dll)
The following example shows the creation of a new package and a variable, var, being added to the Variables collection owned by the Package. A Variable has a Properties collection, as well as several other objects, and this example shows the method being set for the variable.
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…