[]
Initializes a new instance of the Label class with the specified key.
public Label(int key)
Public Sub New(key As Integer)
| Type | Name | Description |
|---|---|---|
| int | key | The int value which should be used as label key. |
Use this constructor if your business logic requires setting custom key value. Make sure that you use the correct constructor overload (with integer or Guid key value) and that key value is unique.
Initializes a new instance of the Label class with the specified key.
public Label(Guid key)
Public Sub New(key As Guid)
| Type | Name | Description |
|---|---|---|
| Guid | key | The Guid value which should be used as label key. |
Use this constructor if your business logic requires setting custom key value. Make sure that you use the correct constructor overload (with integer or Guid key value) and that key value is unique.
Creates the new Label object with default parameters.
public Label()
Public Sub New()
Creates custom Label object with specified text.
public Label(string text)
Public Sub New(text As String)
| Type | Name | Description |
|---|---|---|
| string | text | The text of the label. |
Creates custom Label object with specified text and menu caption.
public Label(string text, string menuCaption)
Public Sub New(text As String, menuCaption As String)
| Type | Name | Description |
|---|---|---|
| string | text | The text of the label. |
| string | menuCaption | The menu caption for displaying label in dialogs. |
Creates custom Label object with specified color, text and menu caption.
public Label(Color color, string text, string menuCaption)
Public Sub New(color As Color, text As String, menuCaption As String)
| Type | Name | Description |
|---|---|---|
| Color | color | The color of the label. |
| string | text | The text of the label. |
| string | menuCaption | The menu caption for displaying label in dialogs. |
Special constructor for deserialization.
protected Label(SerializationInfo info, StreamingContext context)
Protected Sub New(info As SerializationInfo, context As StreamingContext)
| Type | Name | Description |
|---|---|---|
| SerializationInfo | info | The SerializationInfo. |
| StreamingContext | context | The context information. |