次のコードは、Visual Studio内でリリースを実行するときと、Visual Studioの外でリリースを実行するときの出力が異なります。Visual Studio 2008を使用しており、.NET 3.5をターゲットにしています。.NET 3.5 SP1も試しました。
Visual Studioの外部で実行している場合、JITが起動します。(a)C#で微妙な問題が発生している、または(b)JITに実際にエラーがある。JITがうまくいかないのではないかと思いますが、他の可能性が不足しています...
Visual Studio内で実行したときの出力:
    0 0,
    0 1,
    1 0,
    1 1,Visual Studioの外部でリリースを実行したときの出力:
    0 2,
    0 2,
    1 2,
    1 2,理由は何ですか?
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Test
{
    struct IntVec
    {
        public int x;
        public int y;
    }
    interface IDoSomething
    {
        void Do(IntVec o);
    }
    class DoSomething : IDoSomething
    {
        public void Do(IntVec o)
        {
            Console.WriteLine(o.x.ToString() + " " + o.y.ToString()+",");
        }
    }
    class Program
    {
        static void Test(IDoSomething oDoesSomething)
        {
            IntVec oVec = new IntVec();
            for (oVec.x = 0; oVec.x < 2; oVec.x++)
            {
                for (oVec.y = 0; oVec.y < 2; oVec.y++)
                {
                    oDoesSomething.Do(oVec);
                }
            }
        }
        static void Main(string[] args)
        {
            Test(new DoSomething());
            Console.ReadLine();
        }
    }
}