Convert in memory POCO objects to c# code to initialize
- by sidesinger
Is there a library or code sample for converting an in memory POCO c# object to a .cs code file that creates that object. An example:
object of type car in memory becomes:
Car c = new Car
{
Name = "mazda",
Id = 5,
Passengers = new List<string> { "Bob", "Sally" }
// etc... recursing to the bottom
};
I could assume it could only set public properties.