C# Class System.Net.BigIntegerExtensions

Extension methods to convert System.Numerics.BigInteger instances to hexadecimal, octal, and binary strings.
Mostra file Open project: TrakHound/TrakHound-Community

Public Methods

Method Description
PositiveReverse ( this input, int width ) : System.Numerics.BigInteger

Reverse a Positive BigInteger ONLY Bitwise ~ operator Input : FF FF FF FF Width : 4 Result : 00 00 00 00 Input : 00 00 00 00 Width : 4 Result : FF FF FF FF Input : FF FF FF FF Width : 8 Result : FF FF FF FF 00 00 00 00 Input : 00 00 00 00 Width : 8 Result : FF FF FF FF FF FF FF FF

ToBinaryString ( this bigint ) : string

Converts a BigInteger to a binary string.

ToHexadecimalString ( this bigint ) : string

Converts a BigInteger to a hexadecimal string.

ToOctalString ( this bigint ) : string

Converts a BigInteger to a octal string.

Method Details

PositiveReverse() public static method

Reverse a Positive BigInteger ONLY Bitwise ~ operator Input : FF FF FF FF Width : 4 Result : 00 00 00 00 Input : 00 00 00 00 Width : 4 Result : FF FF FF FF Input : FF FF FF FF Width : 8 Result : FF FF FF FF 00 00 00 00 Input : 00 00 00 00 Width : 8 Result : FF FF FF FF FF FF FF FF
public static PositiveReverse ( this input, int width ) : System.Numerics.BigInteger
input this
width int
return System.Numerics.BigInteger

ToBinaryString() public static method

Converts a BigInteger to a binary string.
public static ToBinaryString ( this bigint ) : string
bigint this A .
return string

ToHexadecimalString() public static method

Converts a BigInteger to a hexadecimal string.
public static ToHexadecimalString ( this bigint ) : string
bigint this A .
return string

ToOctalString() public static method

Converts a BigInteger to a octal string.
public static ToOctalString ( this bigint ) : string
bigint this A .
return string