Gurux.DLMS.GXDLMSTranslatorStructure.IntegerToHex C# (CSharp) Method

IntegerToHex() public method

Convert integer to string.
public IntegerToHex ( System.UInt64 value ) : string
value System.UInt64 Conveted value.
return string
        public string IntegerToHex(UInt64 value)
        {
            if (showNumericsAsHex
                    && OutputType == TranslatorOutputType.SimpleXml)
            {
                return value.ToString("X16");
            }
            return value.ToString();
        }
    }

Same methods

GXDLMSTranslatorStructure::IntegerToHex ( long value, int desimals ) : string

Usage Example

示例#1
0
 private static void AppendMethodDescriptor(GXDLMSTranslatorStructure xml, int ci, byte[] ln, byte attributeIndex)
 {
     xml.AppendStartTag(TranslatorTags.MethodDescriptor);
     if (xml.Comments)
     {
         xml.AppendComment(((ObjectType)ci).ToString());
     }
     xml.AppendLine(TranslatorTags.ClassId, "Value", xml.IntegerToHex((int)ci, 4));
     xml.AppendComment(GXCommon.ToLogicalName(ln));
     xml.AppendLine(TranslatorTags.InstanceId, "Value", GXCommon.ToHex(ln, false));
     xml.AppendLine(TranslatorTags.MethodId, "Value", xml.IntegerToHex(attributeIndex, 2));
     xml.AppendEndTag(TranslatorTags.MethodDescriptor);
 }
All Usage Examples Of Gurux.DLMS.GXDLMSTranslatorStructure::IntegerToHex