/// <summary> /// Creates a new row based on the given paramdef with default values. /// </summary> public Row(long id, string name, PARAMDEF paramdef) { ID = id; Name = name; var cells = new Cell[paramdef.Fields.Count]; for (int i = 0; i < paramdef.Fields.Count; i++) { PARAMDEF.Field field = paramdef.Fields[i]; object value = ParamUtil.CastDefaultValue(field); cells[i] = new Cell(field, value); } Cells = cells; }