<p>My scenario should be simple... the type I want to convert <em>FROM</em> is <em>ALWAYS</em> 'string'. What I want to convert to... could be many things - ints, DateTimes, ... strings, etc.</p>

<p>This would be easy:</p>

<pre><code>string valueToConvertFrom = "123";

int blah = Convert.ToInt32(valueToConvertFrom);
</code></pre>

<p>However... I don't know (until runtime) that the value I need to convert to is an 'Int' (or whatever). I have tried this:</p>

<pre><code>string valueToConvertFrom = "123";

Type convertToType = typeof(int);

object blah = Convert.ChangeType(valueToConvertFrom, convertToType);
</code></pre>

<p>But that gives me the following error: "Object must implement IConvertible."</p>

<p>I don't want to have to do a switch statement and call "Convert.ToBlah" based on the type name... any suggestions?</p>

String class implements IConvertible, this code simply SHOULD work. Which version of .NET are you aiming?
```
```
object o = Convert.ChangeType( str, convertToType );
```
```
Besides, most of the types you mentioned implement Parse method, so your best shot might be something like this.
```
```
Type convertToType = ...;
MethodInfo mi = convertToType.GetMethod("Parse", BindingFlags.Static);
object blah;
if(mi != null)
{
    blah = mi.Invoke(null, new object[]{valueToConvertFrom});
}
else
{
    // the type doesn't implement the Parse method, handle it another way :/
}
```
```