Is that possible in C# to obtain array from System.Collections.IList interface without using Generics?
EDIT: I need some approach for converting collection to array. My collection is assigned to IList. Is that possible to do that? I don’t know real implementation of my collection so I can’t do e.g. like this
int[] arr = (ArrayList)list.ToArray();
You can use the
CopyTomethod: