Variable boxing and == vs. Equals
Let's take a moment and think about exactly how boxed variables work when checking to see if they are equal. Here is a little Console application to do a quick comparison of how the Equals function and == operator work. using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace VariableBoxEqualityTest
{
class Program
{
static void Main(string[] args)
{
int x = 1;
int y = 1;
test(x, y);
...
[More]