m chore: type:value -> value types |
cleanup |
||
Line 1: | Line 1: | ||
The '''Nullable<T>''' type is a C# construct that wraps around a non-nullable [https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/builtin-types/value-types C# value type] to allow the type to store an additional value--<code>null</code>--representing the absense of a value. | |||
Nullable types are a [[value type]] in the FrooxEngine data model, but an [[Type:Object|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 == | == 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]. | |||
* Wikipedia's definition of [https://en.wikipedia.org/wiki/Nullable_type nullable types]. | * Wikipedia's definition of [https://en.wikipedia.org/wiki/Nullable_type nullable types]. | ||
[[Category:Type]] | [[Category:Type]] | ||
[[Category:Value Types]] | [[Category:Value Types]] |
Latest revision as of 02:58, 10 December 2024
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
- Microsoft's documentation on the nullable value types & nullable reference types.
- Wikipedia's definition of nullable types.