c#:
struct myStruct
{
   int a;
   int b;
   BitArray inner_data=new BitArray[32];
}

解决方案 »

  1.   

    更正:struct myStruct
    {
       int a;
       int b;
       BitArray inner_data=new BitArray(32);   public int c
       {
         get{ 
               int[] i=inner_data.CopyTo(i,0);
               return i[0];
            }
        }    //d 与c一样处理
    }
      

  2.   

    struct myStruct
    {
       int a;
       int b;
       BitArray inner_data=new BitArray(32);   public int c
       {
         get{ 
               int[] i;
               inner_data.CopyTo(i,0);
               return i[0];
            }
        }    //d 与c一样处理
    }
      

  3.   

    look at the example athttp://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpconunionssample.asp