title: Get/Set Method for Array Properties
body: <p>I have an <code>Entry</code> class, through which i want to expose data to a Gridview in WPF (via an <code>List&lt;Entry&gt;</code>). I need to have a column in the Gridview for every property of the <code>Entry</code> object (also get one column for every entry of <code>propsA3</code>), but I am uncertain how to define the getter/setter methods for the array in order to always get/set the properties of the underlying data.</p>
  
  <pre><code>public Entry
  {
    private ObjA oA;
    private ObjB[] listB;
  
    public int PropA1 {get {return oA.Prop1;} set {oA.Prop1 = value;}}
    public int PropA2 {get {return oA.Prop2;} set {oA.Prop1 = value;}}
    public int[] propsA3;
  }
  
  public ObjA
  {
     public int Prop1 {get, set};
     public int Prop2 {get, set};
  
     public int getVal3(ObjB b) {return calSomethin(b);}
     public int setVal3(ref ObjB b, int val) { /*do something to ObjB*/}
  }
  
  public ObjB
  {
     Byte[] data;
  }
  </code></pre>
  
  <p>What I want for <code>PropsA3</code> have a get/set behavior of the following:</p>
  
  <pre><code>Entry e;
  </code></pre>
  
  <p>Get: 
  <code>int a = e.propsA3[i];</code> => <code>a = oA.getVal3(listB[i])</code>;</p>
  
  <p>Set:
  <code>e.propsA3[i] = 5;</code>     => <code>oA.setVal3(listB[i], val)</code>;</p>
  
  <p>Is this possible? How can achieve this or how do I have to change the class design to get the desired result?</p>