共用方式為


ComponentRenameEventArgs 類別

定義

提供 ComponentRename 事件的資料。

public ref class ComponentRenameEventArgs : EventArgs
public class ComponentRenameEventArgs : EventArgs
[System.Runtime.InteropServices.ComVisible(true)]
public class ComponentRenameEventArgs : EventArgs
type ComponentRenameEventArgs = class
    inherit EventArgs
[<System.Runtime.InteropServices.ComVisible(true)>]
type ComponentRenameEventArgs = class
    inherit EventArgs
Public Class ComponentRenameEventArgs
Inherits EventArgs
繼承
ComponentRenameEventArgs
屬性

範例

下列範例示範如何建立 ComponentRenameEventArgs

public:
   // This example method creates a ComponentRenameEventArgs using the specified arguments.
   // Typically, this type of event args is created by a design mode subsystem.
   ComponentRenameEventArgs^ CreateComponentRenameEventArgs( Object^ component, String^ oldName, String^ newName )
   {
      // The component that was renamed:          args.Component
      // The previous name of the component:      args.OldName
      // The new name of the component:           args.NewName
      return gcnew ComponentRenameEventArgs( component, oldName, newName );
   }
// This example method creates a ComponentRenameEventArgs using the specified arguments.
// Typically, this type of event args is created by a design mode subsystem.  
public ComponentRenameEventArgs CreateComponentRenameEventArgs(object component, string oldName, string newName)
{
    ComponentRenameEventArgs args = new ComponentRenameEventArgs(component, oldName, newName);

    // The component that was renamed:          args.Component
    // The previous name of the component:      args.OldName
    // The new name of the component:           args.NewName            

    return args;
}
' This example method creates a ComponentRenameEventArgs using the specified arguments.
' Typically, this type of event args is created by a design mode subsystem.  
Public Function CreateComponentRenameEventArgs(ByVal component As Object, ByVal oldName As String, ByVal newName As String) As ComponentRenameEventArgs
    Dim args As New ComponentRenameEventArgs(component, oldName, newName)

    ' The component that was renamed:          args.Component
    ' The previous name of the component:      args.OldName
    ' The new name of the component:           args.NewName            

    Return args
End Function

備註

提供 ComponentRenameEventArgs 事件的相關 ComponentRename 數據。

ComponentRenameEventArgs物件提供下列資訊:

  • 屬性 Component ,參考要重新命名的元件。

  • OldName屬性,表示元件的舊名稱。

  • NewName屬性,表示元件的新名稱。

建構函式

ComponentRenameEventArgs(Object, String, String)

初始化 ComponentRenameEventArgs 類別的新執行個體。

屬性

Component

取得將重新命名的元件。

NewName

取得重新命名事件後的元件名稱。

OldName

取得重新命名事件前的元件名稱。

方法

Equals(Object)

判斷指定的物件是否等於目前的物件。

(繼承來源 Object)
GetHashCode()

做為預設雜湊函式。

(繼承來源 Object)
GetType()

取得目前執行個體的 Type

(繼承來源 Object)
MemberwiseClone()

建立目前 Object 的淺層複製。

(繼承來源 Object)
ToString()

傳回代表目前物件的字串。

(繼承來源 Object)

適用於

另請參閱