convert array object to int[] c#

C#
object[] objarr = new object[] {1,2,3 };
int[] arr = objarr.Cast<int>().ToArray();
Source

Also in C#: