.NET

Code Snippets in Visual Studio

There’s a lot to be said for working solo, but working in an environment with other developers definitely has its advantages.  Earlier, I posted about a co-worker who asked me a question about SQL and I had to dig through my brain to re-discover a way to do conditional joins.  Well, another co-worker offered up a tip that I probably would’ve not learned about had I been working solo.


In Visual Studio you can highlight a piece of code and drag it to the toolbox.  Rename it to something useful, and you have yourself an easy way to include code later that you may have had to retype or take time to find it then copy-paste it where you want it.  All you have to do is drag and drop that snippet from the toolbox to where you want it in your code.  Pretty cool!

Leave a Reply

Your email address will not be published. Required fields are marked *