Design Pattern for Changing Object
- by user210757
Is there a Design Pattern for supporting different permutations object?
Version 1
public class myOjbect {
public string field1 { get; set; } /* requirements: max length 20 */
public int field2 { get; set; }
. . .
public decimal field200 { get; set; }
}
Version 2
public class myObject {
public string field1 { get; set; } /* requirements: max length 40 */
public int field2 { get; set; }
. . .
public double field200 { get; set; } /* changed data types */
. . ./* 10 new properties */
public double field210 { get; set; }
}
of course I could just have separate objects, but thought there might be a good pattern for this sort of thing.