Earn achievements while you code! With Visual Studio Achievements, you will unlock various achievements based on your activity.
Tag Archives: VIsual Studio
Visual Studio Achievements window just keeps “Loading”
Visual Studio: display line numbers
Visual Studio code selection as HML
I was looking for a possibility to copy selected Visual Studio code as HTML to publish code easily.
I am using Windows Live Writer and WordPress. There is a plugin called "Paste As Visual Studio Code".
Here you can download this plugin.
Install this plugin, start Windows Live Writer, copy some code from Visual Studio IDE, switch to tab “Insert” and paste it into an Windows Live Writer article clicking the plugin button.
Outputdebugstring in .NET / Visual Studio / C# / WPF
In my old Delphi developer days I used OutputDebugString() to track problems or elapsed time.
In .NET you can use the System.Diagnostics.Debug class.
You have to run the project in debug mode.
- private void ReadFirstFile(string filename1)
- {
- StatusText = "Reading file 1";
- Stopwatch watch = new Stopwatch();
- watch.Start();
- using (StreamReader file1 = new StreamReader(filename1))
- {
- while (!file1.EndOfStream)
- {
- sc1.Add(file1.ReadLine());
- }
- }
- watch.Stop();
- System.Diagnostics.Debug.WriteLine("Time spent reading file 1: " + watch.Elapsed);
- }
MSDN link: http://msdn.microsoft.com/en-us/library/6x31ezs1.aspx
Enable automatic checks of documentation comments
If you want the C# compiler to check the documentation comments automatically you have to enable xml documentation file in the build settings of your project.
So the compiler reports errors in your documenation.
Default build settings
Build settings with enabled XML documentation file
The compliler reports documentation errors.
Visual Studio Shortcut: uncomment / comment multiple lines
To comment multiple lines please press STRG+K and STRG+C.
To uncomment multiple lines please press STRG+K and STRG+U.