If I have the code:
public class Person
{
public string FirstName { get; set; }
public string LastName { get; set; }
}
How do I convert it to the code below at runtime or compile time?
[DataContract]
public class Person
{
[DataMember]
public string FirstName { get; set; }
[DataMember]
public string LastName { get; set; }
}
Can I do this using DynamicProxy? Cecil? or some other open source project?