IDTSName.Name Property


获取或设置分配给对象的名称。Gets or sets a name assigned to the object.

 property System::String ^ Name { System::String ^ get(); void set(System::String ^ value); };
public string Name { get; set; }
member this.Name : string with get, set
Public Property Name As String

Property Value


一个包含对象名称的字符串。A String that contains the object name.


IDTSName该类由许多类(包括类)继承,该类 Package 通过 DtsContainer 类和 EventsProvider 类,并继承到该类 Package 和大多数其他类。The IDTSName class is inherited by many classes, including the Package class, through the DtsContainer class and into the EventsProvider class, which from there, it is inherited into the Package class and most other classes. 下面的代码示例演示 IDTSName 类使用的属性 PackageThe following code sample shows the IDTSName properties as used by the Package class.

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  

示例输出:Sample Output:

CreationName: MSDTS。Package。1CreationName: MSDTS.Package.1

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


ID: {8E2F8EC1-A6E8-4114-8760-0C1A72277B8C}ID: {8E2F8EC1-A6E8-4114-8760-0C1A72277B8C}


此名称不能与相同 CreationNameThis name may not be the same as the CreationName. 在从继承的多个运行时对象中 IDTSNameName 属性是在图形用户界面中显示的值。In several run-time objects that inherit from IDTSName, the Name property is the value shown in the graphical user interface.

Applies to