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