C# Class NetTools.Bits

显示文件 Open project: jsakamoto/ipaddressrange Class Usage Examples

Public Methods

Method Description
And ( byte A, byte B ) : byte[]
GE ( byte A, byte B ) : bool
GetBitMask ( int sizeOfBuff, int bitLen ) : byte[]
GetBitMaskLength ( byte bytes ) : int?

Counts the number of leading 1's in a bitmask. Returns null if value is invalid as a bitmask.

Increment ( byte bytes ) : byte[]
LE ( byte A, byte B ) : bool
Not ( byte bytes ) : byte[]
Or ( byte A, byte B ) : byte[]

Method Details

And() public static method

public static And ( byte A, byte B ) : byte[]
A byte
B byte
return byte[]

GE() public static method

public static GE ( byte A, byte B ) : bool
A byte
B byte
return bool

GetBitMask() public static method

public static GetBitMask ( int sizeOfBuff, int bitLen ) : byte[]
sizeOfBuff int
bitLen int
return byte[]

GetBitMaskLength() public static method

Counts the number of leading 1's in a bitmask. Returns null if value is invalid as a bitmask.
public static GetBitMaskLength ( byte bytes ) : int?
bytes byte
return int?

Increment() public static method

public static Increment ( byte bytes ) : byte[]
bytes byte
return byte[]

LE() public static method

public static LE ( byte A, byte B ) : bool
A byte
B byte
return bool

Not() public static method

public static Not ( byte bytes ) : byte[]
bytes byte
return byte[]

Or() public static method

public static Or ( byte A, byte B ) : byte[]
A byte
B byte
return byte[]