Determining types with generics
<p>The following program outputs "We have something else". How do I properly determine a DataType of the type being passed in?</p>

<pre><code>void Main()
{
    AFunction(typeof(string));
}

void AFunction&lt;T&gt;(T aType) {

    if (aType.GetType() == typeof(string)) {

        Console.WriteLine ("We have a string");

    } else {
        Console.WriteLine ("We have something else");
    }
}
</code></pre>
