System::Text::Json::JsonMemoryMarshal::Cast method

JsonMemoryMarshal::Cast method

Casts a read-only span of one primitive type TFrom to another primitive type TTo.

template<typename TFrom,typename TTo> static ReadOnlySpan<TTo> System::Text::Json::JsonMemoryMarshal::Cast(const ReadOnlySpan<TFrom> &span)
ParameterDescription
TFromThe source type of the span.
TToThe target type of the span.
ParameterTypeDescription
spanconst ReadOnlySpan<TFrom>&The span to cast.

ReturnValue

A read-only span of the target type.

See Also