scm0sml
asked on
setting a property value using reflection
If the code below gets a property by constructing the property name how would i set it?
say i want to set the property availabilityMonth.Day07 = 12 for e.g?
how would i do that?
im trying something like:
dayAvailability.SetValue(_ availabili tyMonth, 2, Reflection.BindingFlags.Se tProperty)
but not getting very far?
say i want to set the property availabilityMonth.Day07 = 12 for e.g?
how would i do that?
im trying something like:
dayAvailability.SetValue(_
but not getting very far?
Dim dayAvailability As Reflection.PropertyInfo = Nothing
dayAvailability = _availabilityMonth.GetType.GetProperty("Day" + monthDay.ToString())
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER