All-In-One Search in Visual Studio 2022


One of the cool features added in Visual Studio 2022 – 17.5 in “All-in-one Search”. It is very handy feature for developers to search code in entire applications.

Enable All-In-One Search in Visual Studio:

Tools > Manage Preview Features > “New Visual Studio Search experience (restart required)”.

Now Presh CTL +T or Search button on top of Visual Studio

Advertisement

How to use Accelerate Builds features in Visual Studio 2022 ?


If you are using Visual studio 2022 with latest version i.e version 17.5.1. You will get benefit of super-fast build features.

I tested in my project. It is super-fast.

But you need to enable this feature in your application like this

Step 1: Go to the Project properties file and make AccelerateBuildsInVisualStudio to true

<AccelerateBuildsInVisualStudio>true</AccelerateBuildsInVisualStudio>

How to create Model class from Json or XML file ?


While working on asp.net core project, so many time we will get scenario to create the model class from Json or Xml file. But in visual studio 2019/2017/2015 there is option to quickly generate the model class from Json or Xml file. It is very handy tips, while working with visual studio

Step to use this feature
1. Create the Class file
2. Go to Edit > Paste Sepcial > Paste JSON As Classes or Paste XML As Class in Class file.

Tips and Tricks of visual studio

I hope it will help to become more productive while working with visual studio.

Power of Immediate Window in Visual Studio


While debugging the application, so many developer will get the scenario to read return input and do the evaluation on basic of that input data. In this scenario immediate window will be very handy tool for developer.

It is available since from initial version of visual studio i.e. Visual Studio 2000. At that time there was no code intelligence.

It has so many cool features which will make the developer life essay to debug the code

1. We can evaluate the return values of method particularly if it is being called by client code

2. We can interact with variable and execute the expression in memory

3. we can easily view the data source while debugging

4. we can easily view the variable holding data.

5. We can easily read the json or soap input data in immediate window. It will be easy to do copy
paste functionality.

Sample code for demo

using System;
using System.Data;

namespace ConsoleApp2
{
    public class Program
    {
        static void Main(string[] args)
        {
            int a = 100;
            Test obj = new Test();
            Console.WriteLine(a);

            //Storing data in straing array
            string[] name = new[] { "Ram", "Mohan", "Chandradev" };

            //Storing data in datatable
            DataTable dt = new DataTable();
            dt.Columns.Add("UserId", typeof(int));
            dt.Columns.Add("UserName", typeof(string));
            dt.Columns.Add("Password", typeof(string));
            dt.Rows.Add(1, "Ramesh", "Chandradev");

            Console.Read();
           
        }

        private static int GetSum(int a, int b)
        {
            return a + b;
        }
    }

    public class Test
    {
        public string GetMessage()
        {
            return "hello";
        }
    }
}