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 상속DtsContainerVariables 통해 컬렉션을 사용합니다.

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  

적용 대상