[C#] StructLayoutAttribute.Pack 필드 설명
·
Programming/C#
해당 포스팅은 MSDN의 설명을 보다 다듬은 글입니다. 원본을 참조하고 싶으면 MSDN을 참조하세요. StructLayoutAttribute.Pack 필드 (System.Runtime.InteropServices) 메모리에 있는 클래스 또는 구조체의 데이터 필드 맞춤을 제어합니다.Controls the alignment of data fields of a class or structure in memory. docs.microsoft.com 사용할 Code using System; using System.Runtime.InteropServices; [StructLayout(LayoutKind.Sequential, Pack = 0)] struct ExampleStruct { public byte b1; p..