title: How are arrays of structures allocated in C#
body: <p>I am trying to allocate an array of structures in C#. For example,</p>
  <pre><code>public struct Channel {
      int ChannelId;
      // other stuff goes here... 
  }
  
  public  struct FrameTraffic {
      public int FrameId;
      public int MaxChannels;
      public Channel[] Channels;
  
      public FrameTraffic(int dummyCS0568 = 0)
      {
          this.FrameId = 0;
          MaxChannels = TableMgr.MaxChannels;
          Channels = new Channel[TableMgr.MaxChannels];
      }
  }
  </code></pre>
  <p>But when I go to allocate an array of FrameTraffic structures, I see that Channels is null. This tells me that Channels is a reference rather than an array of structures. Am I correct? If so, then allocating the Channels array shouldn't embed the array into the structure, but simply satisfy the reference in the structure. I want the structures embedded. Is there a way to do this? Or am I incorrect in my assumptions?</p>