Convert ICollection to Array
| C# | Visual Basic | Visual C++ |
public static T[] ToArray<T>( ICollection<T> collection )
Public Shared Function ToArray(Of T) ( _ collection As ICollection(Of T) _ ) As T()
public: generic<typename T> static array<T>^ ToArray( ICollection<T>^ collection )
- T
- Type of the contents in the array
- collection (ICollection<(Of <(T>)>))
- Collection of items
Array of items