How to index a string array
<p>I have a string array in C# 3.5: </p>

<pre><code>string [] times = new[] {“08:00 am” , “10:00 am”, “120”} ;
</code></pre>

<p>I would like to create indexes to times: <code>StartTime</code>, <code>EndTime</code> , <code>ElaspsedTime</code> so that when I code: </p>

<pre><code>StartTime= “09:00 am” ; 
EndTime= “11:00 am” ;
</code></pre>

<p>then <code>times[0]</code> is set to <code>“09:00 am”</code> , etc.</p>

<p>I could create 3 methods:</p>

<pre><code>private void StartTime(string time)
{    times[0] = time;  }
private void EndTime(string time)
{    times[1] = time;  }
private void ElapsedTime(string time)
{    times[2] = time;   }
</code></pre>

<p>and code </p>

<pre><code>StartTime("09:00");
</code></pre>

<p>but is there a simpler way to do it? </p>
