Assume I have a class as below
class Student
{
public int ID { get; set; }
public string Name { get; set; }
}
Just with 0 more properties.I want to loop through these properties. I can do it through reflection, which will have a performance cost. Is serializing it using Newtonsoft JSON and looping through it better?
Aucun commentaire:
Enregistrer un commentaire