What is the easiest way to cast an object array to an integer array?
ArrayList al = new ArrayList();
object arrayObject = al.ToArray();
int[]arrayInteger = ?
Thanks
If you import System.Linq namespace you can do this:
int[] arrayInteger = a1.Cast<int>().ToArray();
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With