DtsContainer.Variables プロパティ

定義

このコンテナーに関連付けられた変数を含むコレクションを返します。 このプロパティは読み取り専用です。

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

プロパティ値

Variables コレクション。

次の例では、パッケージを作成し、変数コレクションに myVar 変数を追加します。 Package では、Variables の継承によって 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  

適用対象