How to assign object references
January 5, 2024 ยท View on GitHub
There are two main ways to assign objects in Sharp.UI:
- using the
Assignmethod, - using a constructor parameter.
The first example uses the Assign method to assign a label object to a variable named label. This is done using the following code:
new Label().Assign(out label)
The second example uses a constructor parameter to achieve the same result. This is done using the following code:
new Label(out label)