Before reading this article, I would recommend reading the following previous parts,
- Diving into Visual Studio 2015 (Day one) : Code Assistance
- Diving Into Visual Studio 2015: Code Analyzers - Day Two
- Diving Into Visual Studio 2015: Renaming Assistance - Day Three
- Diving Into Visual Studio 2015: Code Refactoring - Day Four
- Diving Into Visual Studio 2015: Debugging Improvements (Breakpoint Configurations and New Error List) - Day 5
Introduction
This article is the continuation part of Debugging Improvements that were explained in Day Five of the series. In the earlier part of the series we covered topics like breakpoint configuration improvements and new improved error list in Visual Studio 2015.This article will cover another debugging improvement of Visual Studio 2015 i.e. tool window support for LINQ and Lambda expressions.

Prerequisites
Visual Studio 2015 Express has been used in this tutorial to explain the concepts and features. For samples and practice, a Visual Studio solution is created having a console application named VS2015ConsoleApplication.The console application contains a MyProduct class containing product as an entity specific basic operations like fetching the product and returning the list of products as shown below.

Prerequisites
Visual Studio 2015 Express has been used in this tutorial to explain the concepts and features. For samples and practice, a Visual Studio solution is created having a console application named VS2015ConsoleApplication.The console application contains a MyProduct class containing product as an entity specific basic operations like fetching the product and returning the list of products as shown below.
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace VS2015ConsoleApplication
- {
- public class MyProducts :IProducts
- {
- List<Product> _allProduct = new List<Product>();
- public MyProducts()
- {
- _allProduct.Add(new Product {ProductCode="0001",ProductName="IPhone",ProductPrice="60000",ProductType="Phone",ProductDescription="Apple IPhone" } );
- _allProduct.Add(new Product { ProductCode = "0002", ProductName = "Canvas", ProductPrice = "20000", ProductType = "Phone", ProductDescription = "Micromax phone" });
- _allProduct.Add(new Product { ProductCode = "0003", ProductName = "IPad", ProductPrice = "30000", ProductType = "Tab", ProductDescription = "Apple IPad" });
- _allProduct.Add(new Product { ProductCode = "0004", ProductName = "Nexus", ProductPrice = "30000", ProductType = "Phone", ProductDescription = "Google Phone" });
- _allProduct.Add(new Product { ProductCode = "0005", ProductName = "S6", ProductPrice = "40000", ProductType = "Phone", ProductDescription = "Samsung phone" });
- }
- /// <summary>
- /// FetchProduct having price greater that 3000
- /// </summary>
- /// <returns></returns>
- public List<Product> FetchProduct() => (from p in _allProduct where Convert.ToInt32(p.ProductPrice) > 30000 select p).ToList();
- /// <summary>
- /// FetchProduct
- /// </summary>
- /// <param name="pCode"></param>
- /// <returns></returns>
- public Product FetchProduct(string pCode)
- {
- return _allProduct.Find(p => p.ProductCode == pCode);
- }
- /// <summary>
- /// FetchProduct with productCode and productName
- /// </summary>
- /// <param name="productCode"></param>
- /// <param name="productName"></param>
- /// <returns></returns>
- public Product FetchProduct(string productCode, string productName)
- {
- return _allProduct.Find(p => p.ProductCode == productCode && p.ProductName==productName);
- }
- public List<Product> GetProductList()
- {
- return _allProduct;
- }
- }
- }








Guest UserPosted May 31, 2016, 11:45 AM
good to know lamda debugging capabilities
Vignesh ManiPosted May 30, 2016, 9:36 AM
Nice one
Debasis SahaPosted May 30, 2016, 1:32 AM
Nice share..
Kapi ShivharePosted May 29, 2016, 12:50 PM
nice one
Bhuvanesh MohankumarPosted May 29, 2016, 12:45 PM
Good one
Manas MohapatraPosted May 29, 2016, 1:06 AM
Good point..