/// <summary> /// Get content values ready for insert/update /// </summary> public static ContentValues genContentValues(List <object> colsAndValues) { ContentValues contVals = new ContentValues(); for (int i = 0; i < colsAndValues.Count; i += 2) { object val = colsAndValues[i + 1]; if (val == null) { contVals.putNull((string)colsAndValues[i]); } else if (val is string) { contVals.put((string)colsAndValues[i], (string)val); } else if (val is int?) { contVals.put((string)colsAndValues[i], (int?)val); } else if (val is long?) { contVals.put((string)colsAndValues[i], (long?)val); } else if (val is sbyte[]) { contVals.put((string)colsAndValues[i], (sbyte[])val); } else if (val is FsID) { contVals.put((string)colsAndValues[i], ((FsID)val).Val); } } return(contVals); }