How to Test if C# ref Arguments Reference the Same Item
<p>In C# given a function with the below signature</p>

<pre><code>public static void Foo(ref int x, ref int y)
</code></pre>

<p>If the function was called using </p>

<pre><code>int A = 10;
Foo(ref A, ref A)
</code></pre>

<p>Inside the function Foo is it possible to test that the x and y arguments reference the same variable? A simple equivalent test of x and y isn't sufficient as this is also true in the case two different variable have the same value. </p>
