Gets a string representing the current instance of the form.
Syntax
| Visual Basic (Declaration) | |
|---|
Public Overridable Function ToString() As String |
| C# | |
|---|
public virtual string ToString() |
Return Value
A string consisting of the fully qualified name of the form object's class, with the
System.Windows.Forms.Form.Text property of the form appended to the end. For example, if the form is derived from the class
MyForm in the
MyNamespace namespace, and the
System.Windows.Forms.Form.Text property is set to
Hello, World, this method will return
MyNamespace.MyForm, Text: Hello, World.
Requirements
Target Platforms: Current Windows operating system with .NET 8.
See Also