Constructor Label
Label(Control)
Initializes a new instance of the Label class with the specified parent control.
public Label(Control parent)
Parameters
parentControlParent of the control.
Label(string?)
Initializes a new instance of the Label class with the specified text.
public Label(string? text)
Parameters
textstringValue of the text property.
Label(Control, string)
Initializes a new instance of the Label class with the specified text and parent control.
public Label(Control parent, string text)
Parameters
Label(IEnumerable<string>)
Initializes a new instance of the Label class with the specified text lines. This constructor allows you to create a label with multiple lines of text, which will be separated by new line characters. Also this constructor turns on word wrapping by default.
public Label(IEnumerable<string> text)
Parameters
textIEnumerable<string>A collection of strings representing the lines of text to be displayed in the label. Each element in the collection represents a separate line.
Label(Control, IEnumerable<string>)
Initializes a new instance of the Label class with the specified parent control and text content.
public Label(Control parent, IEnumerable<string> text)
Parameters
parentControlThe parent control that will contain this label. Cannot be null.
textIEnumerable<string>A collection of strings representing the text content of the label. Each string in the collection will be displayed as a separate line.
Label()
Initializes a new instance of the Label class.
public Label()