MarshalByValueComponent.ToString 方法

返回包含 Component 的名称的 String(如果有)。不应重写此方法。

**命名空间:**System.ComponentModel
**程序集:**System(在 system.dll 中)

语法

声明
Public Overrides Function ToString As String
用法
Dim instance As MarshalByValueComponent
Dim returnValue As String

returnValue = instance.ToString
public override string ToString ()
public:
virtual String^ ToString () override
public String ToString ()
public override function ToString () : String

返回值

包含该 Component 的名称的 String(如果有)。 如果 Component 未命名,则为 空引用(在 Visual Basic 中为 Nothing)。

备注

Component 可能有也可能没有名称。如果向 Component 提供名称,则该名称对于其 IContainer 中的其他 Component 对象是唯一的。

ISite 保存 Component 的名称。只有当 Component 已添加到 IContainer 中并且 IContainer 为其分配了 ISite 时,它才能具有 ISite

平台

Windows 98、Windows 2000 SP4、Windows CE、Windows Millennium Edition、Windows Mobile for Pocket PC、Windows Mobile for Smartphone、Windows Server 2003、Windows XP Media Center Edition、Windows XP Professional x64 Edition、Windows XP SP2、Windows XP Starter Edition

.NET Framework 并不是对每个平台的所有版本都提供支持。有关受支持版本的列表,请参见系统要求

版本信息

.NET Framework

受以下版本支持:2.0、1.1、1.0

.NET Compact Framework

受以下版本支持:2.0、1.0

请参见

参考

MarshalByValueComponent 类
MarshalByValueComponent 成员
System.ComponentModel 命名空间
String
IContainer 接口
Container 类
ISite 接口