Debugowanie LINQ w Visual Studio 2012

0

Postanowiłem sobie ułatwić życie i nauczyć się korzystać z LINQ. Natrafiłem jednak na pewną niezgodność - mianowicie:

 using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace LINQ_to_Objects
{
    class Program
    {
        static void VideoGames()
        {
            string[] ArrayOfVideoGames = { "Gothic", "Gothic Mroczne Tajemnice", "Gothic Czas Zapłaty", "Crysis", "Crysis 2", "Crysis 3", "Dragon Age", "Tibia" };
            IEnumerable<string> subset = from game in ArrayOfVideoGames where game.Contains("T") orderby game select game;

            foreach (string g in subset)
                Console.WriteLine("{0}", g);

        }
        static void IntNumbers()
        {
            int[] tabOfInteger = { 1, 2, 10, 45, 60, 80, 18, 8 };
            var subset = from i in tabOfInteger where i < 10 select i;
            foreach (var i in subset)
                Console.WriteLine(i);
            tabOfInteger[0] = 7;

            foreach (var i in subset)
                Console.WriteLine(i);


        }
        static void Main(string[] args)
        {
               VideoGames();
               Console.WriteLine("------------");
               IntNumbers();
               Console.ReadLine();
        }
    }
}

W tutorialu jest napisane aby ustawić break-pointa na:

       var subset = from i in tabOfInteger where i < 10 select i; 

Tak też zrobiłem no i teoretycznie po wskazaniu kursorem myszy na "subset" w pętli foreach powinienem dostać: Result view i podglądnąć wynik zapytania. Problem w tym, że tego nie mam - a może coś źle robie?
Tutorial dotyczy VS2010 a ja mam 2012 może tutaj to inaczej działa?

0

Visual Studio podświetla linijkę kodu, która dopiero za chwilę zostanie wykonana. Zrób jeden krok i dopiero podejrzyj subset.

0

@Rev
dzięki :) Faktycznie teraz działa.

1 użytkowników online, w tym zalogowanych: 0, gości: 1