I've read this documentation but I can't find a macro that generate an integer based on the position of the element in derived model.
This is my goal, to be able to generate Id
attribute with assigned number based on the position of the property in the element.
public class MyData
{
[Id(0)]
public string Name { get; set; }
[Id(1)]
public int Age{ get; set; }
[Id(2)]
public string Address{ get; set; }
}
Is this possible?