I have a class which looks like this:
public class Field
{
public string FieldName;
public string FieldType;
}
And an object List<Field>
with values:
{"EmployeeID","int"},
{"EmployeeName","String"},
{"Designation","String"}
I want to create a class that looks like this:
Class DynamicClass
{
int EmployeeID,
String EmployeeName,
String Designation
}
Is there any way to do this?
I want this to be generated at runtime. I don’t want a physical CS file residing in my filesystem.