Overhead of using structs as wrappers for primitives for type-checking?
<p>Let's say I want to get extra type-checking for working with primitives that mean different things semantically:</p>

<pre><code>public struct Apple
{
    readonly int value;

    // Add constructor + operator overloads
}

public struct Orange
{
    readonly int value;

    // Add constructor + operator overloads
}
</code></pre>

<p>The point is we can't compare "apples to oranges", so wrapping up the actual int in a struct means we get type checking and some extra readability and documentation by code.</p>

<p>My question is: what is the overhead associated with doing this, both in terms of memory and speed? Since structs are value types, would variables containing these structs be 32 bits or larger? What about performance overhead of using these structs instead of primitives - is there a large overhead for the operator overloads?</p>

<p>Any other advice on the wisdom of doing this?</p>
