<p>I read some properties from an xml file, amongst which is a string that refers to an llblgen object for example 'article'. For now I have set up a rather long </p>

<pre><code>Select Case myString
  Case "article"
    return New ArticleEntity()
</code></pre>

<p>Etc. which is getting rather ugly as it gets longer and longer ;). Is there a better way to do this ?</p>

<p>(the above is vb.net, but c# examples are fine as well)</p>

You could store the type names in the file and use:
```
```
return Activator.CreateInstance(Type.GetType("Some.Type.String"));
```
```
(that would work as long as
```
Some.Type.String
```
has a default parameterless constructor.)