vendredi 9 avril 2021

Can I set multiple List Item property values with Reflection?

In continuation to: Can I set a property value with Reflection?, I have a challenge-

class Student
{
    public string Name { get; set; }
    public List<ListItem> Courses { get; set; }
}

List Selections has 2 Items 1.

{
Text = 'Business Management', Value = 'Course 1', Selected = 'true'
}
    {
    Text = 'Network Management', Value = 'Course 2', Selected = 'false'
    }
    

    How do I assign the Selections to Courses property of the Student class?





    Aucun commentaire:

    Enregistrer un commentaire