I need help with refining my string formatter
<p>I am trying to format  strings  depending on the type ...but I feel it's kind of ugly. has anyone have any sugestions for a more refined approch?</p>

<pre><code> string DateFormat = "MMM dd yyyy";
 string NumberFormat = "0.0";

string FormatString(Type t, object value)
    {
        string output = "";

        switch (t.Name.ToUpper())
        {

            case "DATETIME":
                output = ((DateTime)value).ToString(DateFormat);
                break;
            case "SINGLE":
                output = ((Single)value).ToString(NumberFormat);
                break;
            case "DOUBLE":
                output = ((Double)value).ToString(NumberFormat);
                break;
            default:
                output = value.ToString();
                break;
        }

        return output;

    }
</code></pre>
