ProtoFlux:Box: Difference between revisions

From Resonite Wiki
Standardize
add unbox to see also
 
(3 intermediate revisions by 2 users not shown)
Line 12: Line 12:
|}}
|}}


Allows converting a input instance of a ValueType to a Object representation.
The '''Box<T>''' node takes in a [[value type]] and converts it to an [[Type:Object|object]].


== Inputs ==
== Inputs ==
Line 18: Line 18:
=== Box (Generic) ===
=== Box (Generic) ===


The value to box into an object
The value to box into an object.


== Outputs ==
== Outputs ==
Line 24: Line 24:
=== * ([[Type:Object|Object]]) ===
=== * ([[Type:Object|Object]]) ===


The resulting Object that contains Box (Generic)'s output.
The converted value as an object.


== Examples ==
== See also ==


<gallery widths=480px heights=480px>
* [[ProtoFlux:Unbox]] for unboxing objects into their underlying type
File:ProtoFlux_Example_Box|an example using a mix of Boxes and casts for a format string node.
* [https://learn.microsoft.com/en-us/dotnet/csharp/programming-guide/types/boxing-and-unboxing Microsoft documentation on C# boxing and unboxing]
</gallery>
 
[[Category:ProtoFlux:Core]]

Latest revision as of 16:23, 18 April 2025

Box
Box
*
Core

The Box<T> node takes in a value type and converts it to an object.

Inputs

Box (Generic)

The value to box into an object.

Outputs

* (Object)

The converted value as an object.

See also