c# create array with one element code example Example: c# create array with n elements int[] arr = Enumerable.Range(0, X+1).ToArray();