Bagikan melalui


Variable.Properties Properti

Definisi

Mendapatkan koleksi DtsProperty objek. Properti ini bersifat hanya baca.

public:
 property Microsoft::SqlServer::Dts::Runtime::DtsProperties ^ Properties { Microsoft::SqlServer::Dts::Runtime::DtsProperties ^ get(); };
public Microsoft.SqlServer.Dts.Runtime.DtsProperties Properties { get; }
member this.Properties : Microsoft.SqlServer.Dts.Runtime.DtsProperties
Public ReadOnly Property Properties As DtsProperties

Nilai Properti

Koleksi DtsProperties .

Penerapan

Contoh

Contoh berikut membuat paket dan menambahkan variabel ke Variables koleksi. Kemudian mengulangi DtsProperties koleksi dan menampilkan nama setiap properti dalam koleksi.

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  

Contoh Output:

Jumlah properti dalam variabel = 12

CreationName

DataType

Deskripsi

EvaluateAsExpression

ID

Nama

Ruang nama

QualifiedName

RaiseChangedEvent

ReadOnly

SystemVariable

Nilai

Berlaku untuk