I found out that 3 different ways are used to add a Code Snippet in your code:
- Right Click --> Insert Snippet --> then select a snippet.
- Ctrl button + k + x --> this combination will allow you to select a Code Snippet
- Using the Tab button. If you know the name of the Snippet, simply type it, then press Tab twice. For example, "if" if a built-in snippet for you, type if then hit Tab twice, you will see the snippet inserted.
Hope this helps you!
Regards
Tags:
149858e8-8541-4a6d-8c6d-2e79638c9cb4|0|.0
I was working on Visual Studio 2005 lately and noticed a new feature which is AutoRecorvery.
You can define a certain time span to allow VS to autosave your work in case an electricity failure or any other failure happens, just like MS Word does!
To reach this option, Tools --> Options --> Environment --> AutoRecover.
Hope this tip helps you!
Regards
Tags:
c76e2aee-ca6d-41e9-bc71-1ff443f9ae64|0|.0
I have always heard that Optional parameters are not explicitly available in C#. Lately, I was reading the: Microsoft Visual C# Core Reference, while reading the section about Params keyword in C#, I got an idea that we can implement Optional Parameters in C# using the Params keyword.
Just to be on the safe side and you all know what Params means, it allows you to send to a method an array of unspecified number of arguments.
So make sure when you want to use the Params keyword to have it as the last item in the method parameters, because any parameter after it, will be collected as an array in the method body.