Find the current opened file in the solution explorer – Visual Studio tips

Hi Everyone,

Today I was working on some project and I have added a new file in the project, we have a habit of refreshing Solution Explorer when we do this.

Instead of clicking on Refresh button on Solution Explorer, it happened to click the button which is next to it. Trust me, I have never used and don’t even know anything about that till I clicked it.

I feel, it is good feature that every developer must know. When we click on this, it automatically selects the file which is currently opened in Canvas. Check the below video to understand more.

This has raised a thought in my mind, why don’t Visual studio automatically select the item which is opened instead of giving a button to click. After a quick search on this came to know that there is setting for this.

Visual Studio –> Tools –> Options –> Projects and Solutions –> General

Check “Track Active Item in Solution Explorer” which will automatically selects the current opened file in Solution Explorer.

Hope this helps.

Happy Coding,

Cool feature in Visual Studio – Generate Class from JSON or XML

Hi Everyone,

Today I was asked a question by one of my friends on if I know any easy way which can generate C# Class if we give JSON as an input. And I don’t know anyway but certainly there should be an easy way to do the same.

To my surprise, it turned to be a very easy one. Visual Studio has cool feature, copy JSON or XML to the clipboard –> Open any class file –> Edit –> Paste Special.

Hope this helps.

Happy Coding