DtsContainer.Variables Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Returns a collection that contains the variables associated with this container. This property is read-only.
public:
property Microsoft::SqlServer::Dts::Runtime::Variables ^ Variables { Microsoft::SqlServer::Dts::Runtime::Variables ^ get(); };
public Microsoft.SqlServer.Dts.Runtime.Variables Variables { get; }
member this.Variables : Microsoft.SqlServer.Dts.Runtime.Variables
Public ReadOnly Property Variables As Variables
Property Value
A Variables collection.
Examples
The following example creates a package, and adds a variable, myVar
, to the variable collection. The Package has use of the Variables collection through its inheritance of DtsContainer.
static void Main(string[] args)
{
Package p = new Package();
//Add a variable, ,myvar, to the package variables
// collection with a value of 5, in the myNamespace
// namespace
Variable var = p.Variables.Add("myVar", false, "myNamespace", 5);
//
// rest of code here...
//
}
Shared Sub Main(ByVal args() As String)
Dim p As Package = New Package()
'Add a variable, ,myvar, to the package variables
' collection with a value of 5, in the myNamespace
' namespace
Dim var As Variable = p.Variables.Add("myVar",False,"myNamespace",5)
'
' rest of code here...
'
End Sub