objects in a c# arraylist
<p>I'm coming from a Javascript background which possibly is a good thing although so far it's proving to be a bad thing.</p>

<p>In Javascript, I have:</p>

<pre><code>function doStuff(){
    var temp = new Array();
    temp.push(new marker("bday party"));
    alert(temp[0].whatsHappening); // 'bday party' would be alerted
}

function marker(whatsHappening) {
    this.whatsHappening = whatsHappening;
}
</code></pre>

<p>I would now like to do the same thing in C#. I have set up a class:</p>

<pre><code>class marker
{
    public string whatsHappening;

    public marker(string w) {
        whatsHappening = w;
    }
} 
</code></pre>

<p>and add a new object, but I can't seem to call the data in the same way:</p>

<pre><code>ArrayList markers = new ArrayList();

markers.Add(new marker("asd"));
string temp = markers[0].whatsHappening; // This last bit isn't allowed
</code></pre>
