2005-01-14から1日間の記事一覧

C#でunion

using System.Runtime.InteropServices; [ StructLayout( LayoutKind.Explicit )] public struct union { [ FieldOffset( 0 )] public Int16 i; [ FieldOffset( 0 )] public byte b0; [ FieldOffset( 1 )] public byte b1; }こんな感じ?