[StructLayout(LayoutKind.Explicit)]是说明结构数据在内存中的布局类型是需要显示指明的,也就是像下面的在每个数据域之前加上[FieldOffset(x)]
[FieldOffset(x)]应该是指明结构中指定数据域的地址偏移量吧,我也不太清楚

解决方案 »

  1.   

    In this case, "[]"  is using for attributes... "attribute"is a class inherit from System.Attribute to describe a class,method and so on.. [STAThread] placed on the entry point of windows applications  to indicate that this thread is a single-apartment thread.  This is
    used for COM interop, which some of the controls (such as the rich text box)
    require to provide their functionality.  It doesn't hurt to have it there,
    unless you are doing some COM interop which would interfere with this.
      

  2.   

    TO 想飞的鱼:呵..兄弟说的是WINDOWS中的命令行,T-SQL的帮助中的语法解释吧.此[]非彼[]...
      

  3.   

    to haiwangstar(八月桂花香) 你能不能用中文帮我解释一下了 ?  我只看明白说这是一种属性
    具体了?
      

  4.   

    在这里,[]代表特性(Attributers)也有译作属性的.在[]中的内容,本身也是一个类,是从System.Attribute派生的类,作用是用来对类型,成员进行注释,有了这个东东,你就可以在运行时通过反射(reflection)来获得这信息.在编译时,这些信息是编译在EXE文件里的,称为元数据,所以在C#中可以创建自我包含,自我描述的组件,而不是像从前的组件,需要在EXE文件之外,保存好多琐碎的信息.以[STAThread] 为例,当在主函数前面加了这个属性后,CLR在加载这个程序时,就会知道,哦,这个程序主线程是单线程单元模式的线程,在使用RichTextBox之类的COM组件时,就会使用STA模式,否则,CLR就不知道该用哪一种单元模式,因为你没指定...Attributes的用处很多,在实际中慢慢体会吧.以上仅供参考...
      

  5.   

    []里的是特性,是下面紧接着的类或方法或属性(Property)等元素一个特征。