How to force a deep copy when copying structs with arrays?
<p>If have a</p>

<pre><code>struct A {
  public double[] Data;
  public int X;
}
</code></pre>

<p>How can I force a deep copy when using <code>operator=</code> or adding instances of <code>A</code> to a container?</p>

<p>The problem is for example:</p>

<pre><code>A a = new A();
var list = new List&lt;A&gt;();
list.Add(a); // does not make a deep copy of Data
A b = a; // does not make a deep copy of Data
</code></pre>

<p>Do I really have to implement my own <code>DeepClone</code> method and call it every time? This would be extremly error-prone ...</p>
