using System;
using System.Collections.Generic;
using System.IO;
using System.Text;
using System.Threading ;
using System.Xml.Serialization;
using System.Text.RegularExpressions;namespace test
{
    public struct CharStruct
    {
        public char a;
    }    public struct BoolStruct
    {
        public bool a;
    }    class Program
    {
        static void Main(string[] args)
        {
            Console.WriteLine(System.Runtime.InteropServices.Marshal.SizeOf(new CharStruct()));
            Console.WriteLine(System.Runtime.InteropServices.Marshal.SizeOf(new BoolStruct()));            Console.ReadKey();
        }
    }
}  我的问题是,为什么char和bool都占用1个字节,CharStruct大小是1个字节,BoolStruct却是4个字节.
  大侠,请!