MarshalByValueComponent.ToString 方法

定义

返回包含 Component 的名称的 String(如果有)。Returns 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

包含该 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. 如果 Component 为指定了名称,则该名称在其内的其他对象中是唯一的 Component IContainerIf a Component is given a name, the name is unique among other Component objects within its IContainer.

ISite存储的 Component 名称。The ISite stores the Component's name. Component仅当已将 ISite 其添加到并为 IContainer IContainer 其分配时,才能具有 ISiteA Component can only have a ISite if it has been added to an IContainer and the IContainer assigns an ISite to it.

适用于

另请参阅