Extensions
네임스페이스 Going.Basis.Extensions — 정수형 비트/바이트 조작 확장 메서드
public static class Bits
byte, ushort, short, int, uint 타입에 비트/바이트 Get·Set 확장 메서드를 추가합니다.
GetBit — 비트 읽기
| static bool | GetBit | (this byte value, int bitIndex) | byte에서 지정 비트 읽기 |
| static bool | GetBit | (this ushort value, int bitIndex) | ushort에서 지정 비트 읽기 |
| static bool | GetBit | (this short value, int bitIndex) | short에서 지정 비트 읽기 |
| static bool | GetBit | (this int value, int bitIndex) | int에서 지정 비트 읽기 |
| static bool | GetBit | (this uint value, int bitIndex) | uint에서 지정 비트 읽기 |
SetBit — 비트 쓰기 (ref)
| static void | SetBit | (this ref byte value, int bitIndex, bool bitValue) | byte의 지정 비트 설정 |
| static void | SetBit | (this ref ushort value, int bitIndex, bool bitValue) | ushort의 지정 비트 설정 |
| static void | SetBit | (this ref short value, int bitIndex, bool bitValue) | short의 지정 비트 설정 |
| static void | SetBit | (this ref int value, int bitIndex, bool bitValue) | int의 지정 비트 설정 |
| static void | SetBit | (this ref uint value, int bitIndex, bool bitValue) | uint의 지정 비트 설정 |
GetByte — 바이트 읽기
| static byte | GetByte | (this short value, int byteIndex) | short에서 바이트 추출 (byteIndex: 0=하위, 1=상위) |
| static byte | GetByte | (this ushort value, int byteIndex) | ushort에서 바이트 추출 |
| static byte | GetByte | (this int value, int byteIndex) | int에서 바이트 추출 (byteIndex: 0~3) |
| static byte | GetByte | (this uint value, int byteIndex) | uint에서 바이트 추출 |
SetByte — 바이트 쓰기 (ref)
| static void | SetByte | (this ref short value, int byteIndex, byte byteValue) | short의 지정 바이트 설정 |
| static void | SetByte | (this ref ushort value, int byteIndex, byte byteValue) | ushort의 지정 바이트 설정 |
| static void | SetByte | (this ref int value, int byteIndex, byte byteValue) | int의 지정 바이트 설정 |
| static void | SetByte | (this ref uint value, int byteIndex, byte byteValue) | uint의 지정 바이트 설정 |
검색 결과가 없습니다.