Type:Nullable`1: Difference between revisions

From Resonite Wiki
cleanup
m cat caps
 
Line 5: Line 5:
Nullable types are useful when one is unsure whether a value may or may not exist in the first place, rather than reling on some sort of default value that represents the absense of a value. In addition, whenever an "unset" state is useful to keep track of, nullables can come in handy.
Nullable types are useful when one is unsure whether a value may or may not exist in the first place, rather than reling on some sort of default value that represents the absense of a value. In addition, whenever an "unset" state is useful to keep track of, nullables can come in handy.


== See Also ==
== See also ==


* Microsoft's documentation on the [https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/builtin-types/nullable-value-types nullable value types] & [https://learn.microsoft.com/en-us/dotnet/csharp/nullable-references nullable reference types].
* Microsoft's documentation on the [https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/builtin-types/nullable-value-types nullable value types] & [https://learn.microsoft.com/en-us/dotnet/csharp/nullable-references nullable reference types].
Line 11: Line 11:


[[Category:Type]]
[[Category:Type]]
[[Category:Value Types]]
[[Category:Value types]]

Latest revision as of 17:32, 18 April 2025

The Nullable<T> type is a C# construct that wraps around a non-nullable C# value type to allow the type to store an additional value--null--representing the absense of a value.

Nullable types are a value type in the FrooxEngine data model, but an Object in the ProtoFlux data model.

Nullable types are useful when one is unsure whether a value may or may not exist in the first place, rather than reling on some sort of default value that represents the absense of a value. In addition, whenever an "unset" state is useful to keep track of, nullables can come in handy.

See also