System::CastEnumerableTo method

System::CastEnumerableTo(const From&) method

Performs the explicit casting of elements of the specified enumerable object to different type.

template<class To,class From> std::enable_if<!System::detail::has_method_get_Count<From>::value, Collections::Generic::ListPtr<To>>::type System::CastEnumerableTo(const From &enumerable)
ParameterDescription
ToThe type to statically cast the elements of the enumerable object to
FromThe type of enumerable object
ParameterTypeDescription
enumerableconst From&Enumerable object containing the elements to cast

ReturnValue

A pointer to a new collection containing elements of type To equivalent to the elements of enumerable

See Also

System::CastEnumerableTo(const From&) method

Performs the explicit casting of elements of the specified enumerable object to different type.

template<class To,class From> std::enable_if<System::detail::has_method_get_Count<From>::value, Collections::Generic::ListPtr<To>>::type System::CastEnumerableTo(const From &enumerable)
ParameterDescription
ToThe type to statically cast the elements of the enumerable object to
FromThe type of enumerable object
ParameterTypeDescription
enumerableconst From&is inheritor of Enumerable object with defined get_Count method and containing the elements to cast

ReturnValue

A pointer to a new collection containing elements of type To equivalent to the elements of enumerable

See Also