inheritance - Is there a simple way to generically parse data from strings for child class properties of differing types in C#? -
i have base class abstract public class containerclass { protected containerclass () { // stuff } virtual protected void parsedata() { // stuff i'm mentioning later } } and child classes public class childclassone : containerclass { public childclassone () : base () { var1s = "99"; var2s = "88.3"; var3s = "2015-04-22t15:55:25.2625065-07:00"; } public int var1 {get; protected set;} public double var2 {get; protected set;} public datetime var3 {get; protected set;} public string var1s {get; protected set;} public string var2s {get; protected set;} public string var3s {get; protected set;} } and public class childclasstwo : containerclass { public childclasstwo () : base () { var1s = "99.22"; var2s = "88.3"; var3s = "43.44"; } public double var1 {get; protected set;} public double var