Introduction
This article is the continuation part of Debugging Improvements that were explained in Day 5 and Day 6 of the series.
You can learn my 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
- Diving Into Visual Studio 2015: Debugging Improvements (Tool Window Support for LINQ and Lambda) - Day Six
In the earlier part of the series we covered topics like breakpoint configuration improvements and new improved error list, tool window support for lambda and LINQ queries in Visual Studio 2015.This article will cover another debugging improvement of Visual Studio 2015 i.e. new PerfTips feature. 
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, returning the list of products as shown below.
- usingSystem;
- usingSystem.Collections.Generic;
- usingSystem.Linq;
- usingSystem.Text;
- usingSystem.Threading.Tasks;
- namespaceVS2015ConsoleApplication
- {
- public class MyProducts: IProducts
- {
- List < Product > _allProduct = new List < Product > ();
- publicMyProducts()
- {
- _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>
- publicList < Product > FetchProduct() => (from p in _allProductwhere Convert.ToInt32(p.ProductPrice) > 30000 select p).ToList();
- /// <summary>
- /// FetchProduct
- /// </summary>
- /// <param name="pCode"></param>
- /// <returns></returns>
- publicProduct 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>
- publicProduct FetchProduct(string productCode, string productName)
- {
- return_allProduct.Find(p => p.ProductCode == productCode && p.ProductName == productName);
- }
- publicList < Product > GetProductList()
- {
- return_allProduct;
- }
- }
- }




Guest UserPosted Jun 15, 2016, 8:37 AM
This feature avoid timespan end-start check to figure out the time of execution. thnx for share
Bhuvanesh MohankumarPosted May 30, 2016, 1:18 PM
Good one
Vignesh ManiPosted May 30, 2016, 9:29 AM
Nice One.
RajaPosted May 30, 2016, 2:40 AM
Nice Sharing....
Akshay PhadkePosted May 30, 2016, 2:06 AM
Nice
Abhishek KumarPosted May 30, 2016, 2:01 AM
nice..thanks for sharing..
Thiruppathi RPosted May 30, 2016, 1:40 AM
Nice..
Andrei TobaPosted May 29, 2016, 5:18 PM
Hello