Export (0) Print
Expand All

Variable.Properties Property

Gets a collection of DtsProperty objects. This property is read-only.

Namespace:  Microsoft.SqlServer.Dts.Runtime
Assembly:  Microsoft.SqlServer.ManagedDTS (in Microsoft.SqlServer.ManagedDTS.dll)

public DtsProperties Properties { get; }

Implements

IDTSPropertiesProvider.Properties

The following example creates a package and adds a variable to the Variables collection. It then loops through the DtsProperties collection and displays the name of each property in the collection.

static void Main(string[] args)
            {
                Package p = new Package();
                Variable v = p.Variables.Add("x", false, "", 1);
                int vCount =  v.Properties.Count;
                Console.WriteLine("Number of properties in a variable = {0}", vCount);
                DtsProperties vProps = v.Properties;
                foreach (DtsProperty vProp in vProps)
                    Console.WriteLine(vProp.Name);
            }

Sample Output:

Number of properties in a variable = 12

CreationName

DataType

Description

EvaluateAsExpression

ID

Name

Namespace

QualifiedName

RaiseChangedEvent

ReadOnly

SystemVariable

Value

Community Additions

ADD
Show:
© 2014 Microsoft