using System; public class Test { public static void Main() { double[] array = new double[] {1,2,3,4,5}; var indexer1 = new Index(array, 1, 2); Console.WriteLine(indexer1[0]); } class Index { private readonly double[] arr; private readonly int offset; // set this to x in the constructor public int Length { get { return arr.Length; } } public double this[int idx] { get { return arr[idx+offset]; } set { arr[idx+offset] = value; } } public Index(double[] arr1, int x, int y) { arr = arr1; offset = x; } } }