Check out example codes for "c# create array with n elements". It will help you in understanding the concepts better.

Code Example 1

int[] arr = Enumerable.Range(0, X+1).ToArray();

Learn ReactJs, React Native from akashmittal.com