Casts x to the data type, type, by flattening it and unflattening it using the new data type. If the function must reinterpret data instead of transforming it, LabVIEW uses a temporary buffer.
The connector pane displays the default data types for this polymorphic function.

This function can generate unexpected data if x and type are not the same size. If x requires more bits of storage than type, this function uses the upper bytes of x and discards the remaining lower bytes. If x is of a smaller data type than type, this function moves the data in x to the upper bytes of type and fills the remaining bytes with zeros. For example, a U8 with value 1 type cast to a U16 will result in a value of 256. If you want to use arrays with this function, you only can use arrays of scalars or arrays of clusters of scalars.
If you want to upcast or downcast references, use the To More Generic Class and To More Specific Class functions instead of the Type Cast function. The Type Cast function does not provide error checking, but the To More Generic Class and To More Specific Class functions do. The To More Specific Class function has error in and error out parameters. The To More Generic Class function breaks the wire at edit time when you wire a reference to an incompatible target class.
If x might contain Boolean data created with LabVIEW 4.x or earlier, right-click this function and select Convert 4.x Data from the shortcut menu to convert the data to a format that is readable by LabVIEW 5.0 and later. In Convert 4.x Data mode, this function interprets x as if the data is stored in LabVIEW 4.x data storage layout and displays the icon for this function with a red 4.x on it. LabVIEW 4.x and earlier stores Boolean data in two bytes unless the data is in an array, in which case LabVIEW stores each Boolean element in a single bit. LabVIEW 5.0 and later stores Boolean values in a single byte, regardless of whether it is in an array. National Instruments recommends reworking any application that uses the Convert 4.x Data mode as a long term solution.