Practice debugging and troubleshooting. Solving code problems can be a challenge, especially when the errors aren't obvious. With a bit of debugging practice, though, you can learn to quickly identify and fix common errors. One of the ways you can practice your troubleshooting and critical thinking skills is to take an application that is broken, ...continue reading "Debugging Code: Poem Generator (C#)"
Category: Visual Studio
Reading and Writing External Data (C# Console Application)
External data: using text files to store data. We will create a console application that will let us display text from, and save data to, an external data file. After we walk through how to read in data and write it back out, there is an example of how you could build a simple menu ...continue reading "Reading and Writing External Data (C# Console Application)"
Free Programming Development Options
Code text editor and IDE recommendations. Integrated Development Environments (IDEs) and text editors (for coding) can make programming much easier with syntax coloring and other helpful options. You might even want one of both if you'll be working with several languages and different types of projects. There are many excellent free programs, and some that ...continue reading "Free Programming Development Options"
Visual Studio Tip: Aligning Elements
Elements can be aligned horizontally and/or vertically with Visual Studio's formatting tools. You can access them at the top of the interface, or through the Format menu. In this screenshot you can see how selecting multiple elements (shift + click) highlights the alignment options at the top of the interface.
Visual Studio Tip: Regions
Regions allow you to name a section of your code to better organize it. You can also collapse or condense regions by using the - and + signs next to the region area. If you hover over a collapsed region, it will show the code inside.
Visual Studio Tip: Formatting Keyboard Shortcut
CTRL + K and then CTRL + D will format your code. This is helpful, for example, if you have code that isn't indented. Using these two keyboard shortcuts will have Visual Studio reformat your code.
Visual Studio Tip: Commenting Multiple Lines
Commenting multiple lines is easy with keyboard shortcuts. Multiple lines can be commented and uncommented by selecting them and clicking the comment icon, or by using the keyboard shortcut [CTRL + E, C] to comment, and [CTRL + E, U] to uncomment. (Microsoft Visual Studio Ultimate 2012 Screenshots)