Type:Nullable`1: Difference between revisions

From Resonite Wiki
m Epsilion moved page Types:Nullable`1 to Type:Nullable`1: Making type category singular
mNo edit summary
Line 1: Line 1:
{| class="wikitable"
A Nullable<T> is a [[Generic Type|generic]] [[Value Type | value]] variable that can store a null value - normally only possible by [[Reference Type | reference types]].
|-
 
| Color
For more information on how this type functions, see the [https://learn.microsoft.com/en-us/dotnet/api/system.nullable-1 Microsoft documentation on Nullable<T>]
| Type
 
|-
== Usage ==
| style="background-color:{{Nullable-color}}" |
Use this wherever you need a a value variable (for example [[Type:Bool | bool]] or [[Type:Float | float]]), but you also need to track an unset/empty/null state.  
| Nullable<nowiki><T></nowiki>
 
|}
 
A Nullable<nowiki><T></nowiki> is a type that represents the value may be null.
[[Category:Types]]
[[Category:Types]]
[[Category:Types:Value]]

Revision as of 18:01, 14 January 2024

A Nullable<T> is a generic value variable that can store a null value - normally only possible by reference types.

For more information on how this type functions, see the Microsoft documentation on Nullable<T>

Usage

Use this wherever you need a a value variable (for example bool or float), but you also need to track an unset/empty/null state.