static 클래스로 정수형을 바이트 배열로 취득 할 수 있는 클래스 존재.
var bytes = BitConverter.GetBytes(value);
if (BitConverter.IsLittleEndian) { bytes = bytes.Reverse().ToArray(); }
자세한 내용은
http://msdn.microsoft.com/ko-kr/library/vstudio/system.bitconverter(v=vs.100).aspx
참조.
'Functional World > C#' 카테고리의 다른 글
윈도우 8.1 에서의 장치 독립적 코드 작성을 위한 DPI 설정 방법 (0) | 2014.06.22 |
---|---|
Form.ActiveForm (0) | 2013.11.07 |
boxing 에 대한 생각의 오류.... (0) | 2013.09.30 |
IEnumerator 사용하기 - 기초 (0) | 2013.08.11 |
Generic Collections (0) | 2013.07.15 |