Variable.Properties Property
Returns a collection of DtsProperty objects. This property is read-only.
命名空間: Microsoft.SqlServer.Dts.Runtime
組件: Microsoft.SqlServer.ManagedDTS (in microsoft.sqlserver.manageddts.dll)
語法
'宣告
Public ReadOnly Property Properties As DtsProperties
public DtsProperties Properties { get; }
public:
virtual property DtsProperties^ Properties {
DtsProperties^ get () sealed;
}
/** @property */
public final DtsProperties get_Properties ()
public final function get Properties () : DtsProperties
屬性值
A DtsProperties collection.
範例
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
執行緒安全性
Any public static (Shared in Microsoft Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
平台
開發平台
如需受支援的平台清單,請參閱<安裝 SQL Server 2005 的硬體和軟體需求>。
目標平台
如需受支援的平台清單,請參閱<安裝 SQL Server 2005 的硬體和軟體需求>。
請參閱
參考
Variable Class
Variable Members
Microsoft.SqlServer.Dts.Runtime Namespace