Dynamic access of an object’s properties
Lets say you have an object, and you want to dynamic access the object’s properties, what you do? Use ‘Reflection’…here a not so hypothetical scenario: Suppose your ORM tool have map a database table to the following class : public partial class TheoriticalLessonsParticipant { public long ListId { get; set; } public string Participant1 { get; set; } public string Participant2 { get; set; } public string Participant3 { get; set; } public string Participant4 { get; set; } public string Participant5 { get; set; } public string Participant6 { get; set; } public string Participant7 { get; set; } public string Participant8 { get; set; } public string Participant9 { get; set; } public string Participant10 { get; set; } public string Participant11 { get; set; } public string Participant12 { get; set; } … Continue reading Dynamic access of an object’s properties
Copy and paste this URL into your WordPress site to embed
Copy and paste this code into your site to embed