How to add comma seperated string values in dictionary type session variable
<p>I am using c#</p>

<p>I have got below string in my variable.</p>

<pre><code>string results = "Mr,Mike,Lewis,32,Project Manager,India";
</code></pre>

<p>Now I want to add these values in Dictionary type of session variable. I have declared a dict type variable in my code.</p>

<pre><code>Dictionary&lt;string, string&gt; skywardsDetails = new Dictionary&lt;string, string&gt;();
</code></pre>

<p>Write now what I have written code was like below:</p>

<pre><code>if (!string.IsNullOrEmpty(results))                                            
{                                                
    string[] array = results.Split(',');
    string title = array[0];
    string firstname = array[1];
    string lastname = array[2];
    string age = array[3];
    string designation = array[4];    
    string country = array[4];    

    //Here I want to write the new code which will add the results.Split(',') values in my Session variable as a Dictionary type.                                       

    foreach (string key in results.Split(','))
    {
    skywardsDetails.Add(key,//What to do here)
    }
}
</code></pre>

<p>Please suggest</p>
