Form.ToString 方法


获取表示当前窗体实例的字符串。Gets a string representing the current instance of the form.

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


由窗体对象类的完全限定名组成的字符串,窗体的 Text 属性追加到字符串的末尾。A string consisting of the fully qualified name of the form object's class, with the Text property of the form appended to the end. 例如,如果该窗体派生自 MyNamespace 命名空间中的类 MyForm,并且 Text 属性设置为 Hello, World,则此方法会返回 MyNamespace.MyForm, Text:Hello, WorldFor example, if the form is derived from the class MyForm in the MyNamespace namespace, and the Text property is set to Hello, World, this method will return MyNamespace.MyForm, Text: Hello, World.