Partager via


Propriété Properties

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

Espace de noms :  Microsoft.SqlServer.Dts.Runtime
Assembly :  Microsoft.SqlServer.ManagedDTS (en Microsoft.SqlServer.ManagedDTS.dll)

Syntaxe

'Déclaration
Public ReadOnly Property Properties As DtsProperties
    Get
'Utilisation
Dim instance As Variable
Dim value As DtsProperties

value = instance.Properties
public DtsProperties Properties { get; }
public:
virtual property DtsProperties^ Properties {
    DtsProperties^ get () sealed;
}
abstract Properties : DtsProperties
override Properties : DtsProperties
final function get Properties () : DtsProperties

Valeur de propriété

Type : Microsoft.SqlServer.Dts.Runtime. . :: . .DtsProperties
A DtsProperties collection.

Implémente

IDTSPropertiesProvider. . :: . .Properties

Exemples

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);
            }
Shared  Sub Main(ByVal args() As String)
                Dim p As Package =  New Package() 
                Dim v As Variable =  p.Variables.Add("x",False,"",1) 
                Dim vCount As Integer =  v.Properties.Count 
                Console.WriteLine("Number of properties in a variable = {0}", vCount)
                Dim vProps As DtsProperties =  v.Properties 
                Dim vProp As DtsProperty
                For Each vProp In vProps
                    Console.WriteLine(vProp.Name)
                Next
End Sub

Sample Output:

Number of properties in a variable = 12

CreationName

DataType

Description

EvaluateAsExpression

ID

Name

Namespace

QualifiedName

RaiseChangedEvent

ReadOnly

SystemVariable

Value