 <p>There's no "property by index" feature, but one approach that would make consumption easier would be to build an indexer on the class and encapsulate the switch statement there. Maybe something like this:</p> <pre><code>public class Plan { public int this[int index] { get { switch (index) { case 1: return this.a; ... } } set { switch (index) { case 1: this.a = value; ... } } } } </code></pre> <p>So, now using it looks like this:</p> <pre><code>planObject[i] = 100; </code></pre> <p>Now, in your case it <em>looks like</em> you have an additional need because you have a <em>key</em> (the index) and a <em>value</em> (e.g. 100), so you need to store your keys and values in a <code>Dictionary</code>. So, in your class that uses <code>Plan</code> create a <code>private field</code>:</p> <pre><code>private Dictionary&lt;int, int&gt; _values = new Dictionary&lt;int, int&gt; { { 1, 100 }, { 2, 200 }, ... } </code></pre> <p>To use the dictionary you'd do something like this:</p> <pre><code>planObject[i] = _values[i]; </code></pre> <p><strong>UPDATE:</strong> if you can't change the class <code>Plan</code> then you'll need to do something like this. First you need a map from index to property name:</p> <pre><code>private Dictionary&lt;int, string&gt; _properties = new Dictionary&lt;int, string&gt; { { 1, "a" }, { 2, "b" }, ... } </code></pre> <p>and next you'll need to set that property:</p> <pre><code>var t = planObject.GetType(); var p = t.GetProperty(_properties[i]); if (p != null) { p.SetValue(planObject, 100); } </code></pre>