public string ToStringAllBase( ) { return(string.Format("[QWORD: (D): {0} | (H): {1} | (B): {2}", ConventionSupport.ProduceDecimalString(mulQWORD), ConventionSupport.ProduceHexString(mulQWORD), ConventionSupport.ProduceBinaryString(mulQWORD) )); }
public static string ProduceErrorMsg(StackTrace oStackTrace, string sMsg) { smStackTrace = oStackTrace; return(ConventionSupport.cmsErrorMsgPrefix + "[" + sMsg + "] " + ConventionSupport.GetCurrentMethodFileName( ) + ConventionSupport.cmsSpace + ConventionSupport.GetCurrentMethodLineNumber( ) + ConventionSupport.cmsSpace + ConventionSupport.GetCurrentMethodName( ) + ConventionSupport.cmsSpace + ConventionSupport.cmsNewLine); }
public static string ProduceHexString(ulong iValue, int iNumHexDigits) { if (iNumHexDigits > ConventionSupport.MaxiumHexDigitsForToString || iNumHexDigits < ConventionSupport.MinimumDigitsForToString) { StackTrace oStackTrace = new StackTrace( ); string sMsg = string.Format("{0} ( int iValue, int iNumBinaryDigits ): iNumHexDigits must be >= {1} or <= {2} -> was '{3}'", ConventionSupport.GetCurrentMethodName(new StackTrace( )), ConventionSupport.MinimumDigitsForToString, ConventionSupport.MaxiumHexDigitsForToString, iNumHexDigits); throw new Exception(ConventionSupport.ProduceErrorMsg(oStackTrace, sMsg)); } return(ConventionSupport.HexPrefix + iValue.ToString("X" + iNumHexDigits.ToString())); }
public static string ProduceBinaryString(ulong iValue, int iNumBinaryDigits) { if (iNumBinaryDigits > ConventionSupport.MaxiumBinaryDigitsForToString || iNumBinaryDigits < ConventionSupport.MinimumDigitsForToString) { StackTrace oStackTrace = new StackTrace( ); string sMsg = string.Format("{0} ( int iValue, int iNumBinaryDigits ): iNumBinaryDigits must be >= {1} or <= {2} -> was '{3}'", ConventionSupport.GetCurrentMethodName(oStackTrace), ConventionSupport.MinimumDigitsForToString, ConventionSupport.MaxiumBinaryDigitsForToString, iNumBinaryDigits); throw new Exception(ConventionSupport.ProduceErrorMsg(oStackTrace, sMsg)); } return(ConventionSupport.BinaryPrefix + Convert.ToString((int)iValue, 2).PadLeft(iNumBinaryDigits, '0')); }
public override string ToString( ) { return("[BIT: " + ConventionSupport.ProduceBinaryString((byte)(mbnValue.Value & BinaryValue.BitMask_1bit)) + "]"); }
public override string ToString( ) { return("[NYBLE: " + ConventionSupport.ProduceBinaryNybleString((byte)(mnNyble & BinaryValue.BitMask_4bit)) + "]"); }
public override string ToString( ) { return("[DWORD: " + ConventionSupport.ProduceHexString(( uint )(muiDWORD & BinaryValue.BitMask_32bit)) + "]"); }
public override string ToString( ) { return("[BYTE: " + ConventionSupport.ProduceHexString(( byte )(mbByte & BinaryValue.BitMask_8bit)) + "]"); }
public override string ToStringDecimal( ) { return("[BYTE: " + ConventionSupport.ProduceDecimalString(mbByte) + "]"); }
public override string ToString( ) { return("[QWORD: " + ConventionSupport.ProduceHexString((ulong)(mulQWORD & BinaryValue.BitMask_64bit)) + "]"); }
public override string ToString( ) { return("[WORD: " + ConventionSupport.ProduceHexString(( ushort )(musWORD & BinaryValue.BitMask_16bit)) + "]"); }