MarshalByValueComponent.ToString 方法


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

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


String,其中可能含有 Component 的名稱。A String containing the name of the Component, if any.

如果 Component 尚未命名,則為 nullnull if the Component is unnamed.


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

ISiteComponent儲存名稱。The ISite stores the Component's name. IContainer ISite只有在ISite已將Component 新增至,且指派IContainer給它時, 才可以有。A Component can only have a ISite if it has been added to an IContainer and the IContainer assigns an ISite to it.