public static void EnsureFieldDateTime(this FieldCollection flds, string cInternalName, string cFieldTitle, string cFieldDescription, string cGroup) { try { if (!flds.HasField(cFieldTitle, cInternalName)) { flds.AddFieldDateTime(cInternalName, cFieldTitle, cFieldDescription, cGroup); } } catch (Exception ex) { throw new Exception(string.Format("Error in extFieldCollection.EnsureField - {0} - {1}", cFieldTitle, ex.Message), ex); } }