C# Class NSoft.NFramework.Tools.BitTool

Bit 연산 Method 를 제공합니다.
显示文件 Open project: debop/NFramework Class Usage Examples

Public Methods

Method Description
BitFlip ( this value, int bitToFlip ) : int

value의 특정 bit 를 Flip 시킨다.

BitOff ( this value, int bitToOff ) : int

value 의 특정 bit를 Off 한다.

BitOn ( this value, int bitToOn ) : int

value 의 특정 bit를 On 한다.

ToBytes ( this bits, int startIndex, int count = Int32.MaxValue ) : byte[]

BitArray의 Bit 값을 ByteArray로 환산합니다. 이진법을 16진법으로 변경한다는 얘기입니다. (0011 은 0x03)

ToText ( this bits ) : string

BitArray의 비트 값을 문자열로 표현합니다. 예:01010011

Method Details

BitFlip() public static method

value의 특정 bit 를 Flip 시킨다.
public static BitFlip ( this value, int bitToFlip ) : int
value this 대상 값
bitToFlip int Flip 시킬 bit의 값
return int

BitOff() public static method

value 의 특정 bit를 Off 한다.
public static BitOff ( this value, int bitToOff ) : int
value this 대상 값
bitToOff int On 시킬 bit의 값
return int

BitOn() public static method

value 의 특정 bit를 On 한다.
public static BitOn ( this value, int bitToOn ) : int
value this 대상 값
bitToOn int On 시킬 bit의 값
return int

ToBytes() public static method

BitArray의 Bit 값을 ByteArray로 환산합니다. 이진법을 16진법으로 변경한다는 얘기입니다. (0011 은 0x03)
public static ToBytes ( this bits, int startIndex, int count = Int32.MaxValue ) : byte[]
bits this
startIndex int
count int
return byte[]

ToText() public static method

BitArray의 비트 값을 문자열로 표현합니다. 예:01010011
public static ToText ( this bits ) : string
bits this
return string