public static double?GetNullDoubleFieldIfSet(QuickFix.Message message, int field) { if (message.IsSetField(field)) { return(Convert.ToDouble(message.GetDecimal(field))); } else { return(null); } }