My problem:
I have a dynamic codecompiler which can compile a snippet of code. The rest of the code. (imports, namespace, class, main function) is already there. The snipp
You will have to make a conversion method to display it and serialize it to be able to convert it back and forth.
For instance:
public static string ConvertToDisplayString(object o)
{
if (o == null)
return "null";
var type = o.GetType();
if (type == typeof(YourType))
{
return ((YourType)o).Property;
}
else
{
return o.ToString();
}
}