I have a stored procedure which accepts the table name, then it reads the table structure and returns me the table structure in the form of a class definition in a string.
E.g.:
string myString =
"
public class TableName
{
public int Column1 { get; set; }
}
"
Is it possible a create a Class/Type from the string containing the class definition ? For eg:-
Type type = GenerateType(myString);
I have to pass this type variable to my further piece of code so please help me to create class/type from the string containing the class definition.