Component.ToString 方法
定义
public:
override System::String ^ ToString();
public override string ToString ();
override this.ToString : unit -> string
Public Overrides Function ToString () As String
返回
包含 Component 的名称的 String(如果有);如果 Component 未命名,则为 null。A 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 IContainer 。If a Component is given a name, the name is unique among other Component objects within its IContainer.
ISite存储的名称 Component 。The ISite stores the name of the Component. 如果已将 Component ISite 添加到,则只能具有一个 IContainer ,并将 IContainer 分配 ISite 给它。A Component can only have an ISite if it has been added to an IContainer and the IContainer assigns an ISite to it.