protected void WriteBaseXml(XmlWriter writer) { writer.WriteElementString("TypeCode", m_dataTypeCode.ToString()); if (m_value != null) { writer.WriteStartElement("Value"); ObjectSerializer.Write(writer, m_value, m_dataTypeCode); writer.WriteEndElement(); } }
private static int CompareNumericDateVariantTypes(DataTypeCode x, DataTypeCode y, bool throwExceptionOnComparisonFailure) { switch (x) { case DataTypeCode.DateTime: return(1); case DataTypeCode.Double: if (ComparerUtility.IsLessThanReal(y)) { return(1); } return(-1); case DataTypeCode.Decimal: if (ComparerUtility.IsLessThanCurrency(y)) { return(1); } return(-1); case DataTypeCode.Int64: if (ComparerUtility.IsLessThanInt64(y)) { return(1); } return(-1); case DataTypeCode.Int32: return(-1); default: if (throwExceptionOnComparisonFailure) { throw new CommonDataComparerException(x.ToString(), y.ToString()); } return(-1); } }
public override string ToString() { return(base.ToString() + "FieldControls:" + DataStructureCode.ToString() + ":" + DataTypeCode.ToString() + ":" + FieldTerminatorPrintableGraphic + ":" + UnitTerminatorPrintableGraphic + ":" + new string(TruncatedEscapeSequence) + Environment.NewLine); }