Extensions

네임스페이스 Going.Basis.Extensions — 정수형 비트/바이트 조작 확장 메서드

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