I want to select a .cs file and convert it into an object.

for example the file test.cs:

using System;

namespace Test{
public class TestClass {

public TestClass() {
}
}
}

Is it possible (in a completly different solution) to convert this into an object.

I want to get propertys and stuff to generate automatically an XML file.

object o; // i need to fill the object here
Type t = o.GetType();
PropertyInfo[] info = t.GetProperties();

So is it somehow possible to dynamically generate an object of TestClass (in test.cs)??