Q:

How to create an object of class from his string name?

How to create an object of class from his string name in C#/NET in Windows Phone application?
For example in PHP:
$a = 'MainClass';
$b = new $a();

Can I do this in C#/.NET for Windows Phone application?

A:

Try this (providing MainClass has a default constructor):
  // Depending on where you call it, it may require full class name: "MyNameSpace.MainClass"
  var b = Activator.CreateInstance(Type.GetType("MainClass"));

