src/sys/dotnet/perwapi/PERWAPI.cs
/// <summary>
/// Derives a hexademical string for an unsigned long value
/// </summary>
/// <param name="num">the unsigned long value</param>
/// <returns>hex string for the unsigned long value</returns>
Derives a hexademical string for an unsigned long value
Derives a hexademical string for an unsigned long value
public static String Long(ulong num) {
            char[] str = new char[16];
            int strIx = 15;
            for (int i=0; i < lByteMask.Length; i++) {
                ulong b = num & lByteMask[i];
                b >>= (i*8);
                ulong b1 = b & nibble0Mask;
                ulong b2 = (b & nibble1Mask) >> 4;
                str[strIx--] = hexDigit[b1];
                str[strIx--] = hexDigit[b2];
            }
            return new String(str);
        }
public static String Long ( ulong num ) { char [ ] str = new char [ 16 ] ; int strIx = 15 ; for ( int i = 0 ; i < lByteMask . Length ; i ++ ) { ulong b = num & lByteMask [ i ] ; b >>= ( i * 8 ) ; ulong b1 = b & nibble0Mask ; ulong b2 = ( b & nibble1Mask ) >> 4 ; str [ strIx -- ] = hexDigit [ b1 ] ; str [ strIx -- ] = hexDigit [ b2 ] ; } return new String ( str ) ; }
Derives a hexademical string for an unsigned long value
Derives a hexademical string for an unsigned long value
hex string for the unsigned long value
hex string for the unsigned long value
num
ulong
the unsigned long value
the unsigned long value