Component.ToString 方法

定義

傳回任何包含 Component 名稱的 StringReturns a String containing the name of the Component, if any. 不應覆寫此方法。This method should not be overridden.

public:
 override System::String ^ ToString();
public override string ToString ();
override this.ToString : unit -> string
Public Overrides Function ToString () As String

傳回

String

任何包含 Component 名稱的 String,如果 Component 未命名,則為 nullA String containing the name of the Component, if any, or null if the Component is unnamed.

備註

不一定會 Component 有名稱。A Component may or may not have a name. 如果有 Component 指定名稱,則名稱在其內的其他物件之間是唯一的 Component IContainerIf a Component is given a name, the name is unique among other Component objects within its IContainer.

ISite 儲存的名稱 ComponentThe ISite stores the name of the Component. 只有在已 Component ISite 加入至 IContainer ,且將 IContainer 指派給它時,才能使用 ISiteA Component can only have an ISite if it has been added to an IContainer and the IContainer assigns an ISite to it.

適用於

另請參閱