语言

IDTSName.CreationName 属性

定义

返回运行时用来创建该对象实例并将其添加到集合中的名称(如果该对象有集合)。 此属性为只读。

public:
 property System::String ^ CreationName { System::String ^ get(); };
public string CreationName { get; }
member this.CreationName : string
Public ReadOnly Property CreationName As String

属性值

包含名称的字符串。 名称可以是完全限定的装配名称(用于托管装配),也可以是PROGID或CLSID(用于COM DLL)。

示例

IDTSName 类被许多类继承,包括该 Package 类,通过该 DtsContainer 类继承 EventsProvider 到该类,继 Package 承到该类以及大多数其他类中。 以下代码示例展示了 IDTSName 该类所使用的 Package 属性。

using System;  
using System.Collections.Generic;  
using System.Text;  
using Microsoft.SqlServer.Dts.Runtime;  

namespace Microsoft.SqlServer.SSIS.Samples  
{  
    class Program  
    {  
        static void Main(string[] args)  
        {  
            Package pkg = new Package();  
            // Display the properties inherited from IDTSName.  
            Console.WriteLine("CreationName: {0}", pkg.CreationName);  
            Console.WriteLine("Name:         {0}", pkg.Name);  
            Console.WriteLine("Description: {0}", pkg.Description);  
            Console.WriteLine("ID:          {0}", pkg.ID);  
        }  
    }  
}  
Imports System  
Imports System.Collections.Generic  
Imports System.Text  
Imports Microsoft.SqlServer.Dts.Runtime  

Namespace Microsoft.SqlServer.SSIS.Samples  
    Class Program  
        Shared  Sub Main(ByVal args() As String)  
            Dim pkg As Package =  New Package()   
            ' Display the properties inherited from IDTSName.  
            Console.WriteLine("CreationName: {0}", pkg.CreationName)  
            Console.WriteLine("Name:         {0}", pkg.Name)  
            Console.WriteLine("Description: {0}", pkg.Description)  
            Console.WriteLine("ID:          {0}", pkg.ID)  
        End Sub  
    End Class  
End Namespace  

示例输出:

Creation名称:MSDTS。Package.1

名称:{8E2F8EC1-A6E8-4114-8760-0C1A72277B8C}

说明:

编号:{8E2F8EC1-A6E8-4114-8760-0C1A72277B8C}

适用于