public class LooseProperties { public Dictionary<string, object> Properties { get; set; } public LooseProperties() { Properties = new Dictionary<string, object>(); } // Add other standard properties }then:
LooseProperties lp = new LooseProperties(); //To store: lp.Properties.Add("PremiumReminderDays", 1); lp.Properties.Add("CompanyName","Samaan Systems Ltd"); //To retrieve: string company = (string) lp.Properties["CompanyName"];But, TBH, it introduces a lot of opportunities to cause exceptions at run time and, at least to me, smacks of bad design.....