In the previous lessons, we dealt with the steps required to plan, design and research all the elements of our first complex application, and in this lesson we are going to start the first practical step of it: designing the user interface.… Read more
Archive for 2018
XAML: Writing the GUI of our application
Sunday, December 23rd, 2018Research stage of building an application
Thursday, September 6th, 2018The second step in the process of developing an application is the research phase. I was explaining in the previous lessons that there are a few steps for building applications the right way, and that jumping straight on the keyboard is not a good idea.… Read more
Planning an application
Saturday, September 1st, 2018In this lesson, we will focus on the first part of creating our first practical application, the planning stage. As I was explaining in the previous article, planning is extremely important, because it can save us a lot of trouble later on.… Read more
Steps for building an application the right way
Wednesday, August 29th, 2018When building an application, and specially when building FIRST application, most beginners make a lot of mistakes, primarily due to two reasons: lack of experience and carelessness towards any established standards and conduits, based on the “I don’t care how, but it works!”… Read more
Stack vs Heap memory
Wednesday, August 15th, 2018Today we are going to talk all about memory. There are multiple types of memory when it comes to software, but for now we are only interested in two of them: the Stack and the Heap. Whenever we execute a program, its instructions are loaded into the RAM of the computer, and the operating system will allocate a bunch of physical RAM, so that the executable can run.… Read more
Breakpoints and local variables
Wednesday, August 8th, 2018Breakpoints are arguably the most used feature in the process of debugging. As their name suggests, they are literally a point where the execution of your program will break, or more precisely, will pause. Whenever the execution of a program is in this paused state, which isn’t design time, but it’s neither runtime (you could say it is an intermediary between these two states), we say that the program is in debug time, or debugging mode.… Read more
First steps in Debugging: understanding common errors
Tuesday, August 7th, 2018As I said many times, debugging is the process of correcting errors in the codes of your programs. That is only partially true. Debugging is also about understanding the error and understanding why the bug was there in the first place.… Read more
The Using directive
Sunday, August 5th, 2018.NET provides a simplified and easier way of working with resources that needs to be disposed (released when we no longer need them) through construct called a Using directive. Here is an example of how we can read a filename (just like in our previous two lessons) and automatically release it when we are done dealing with it, using this keyword:
1 2 3 4 |
using (StreamReader reader = new StreamReader(fileName)) { // Use the reader variable here } |
By enclosing the declaration of our reader variable inside the using instruction, we can use it just as we normally would, but we don’t need to worry about releasing the file when we are done with it.… Read more
Try Catch Finally
Friday, August 3rd, 2018Continuing from the last lesson, we now know that every time we deal with codes that might generate errors, we should use a Try Catch code construct. You should also know that this great construct offers one more great feature, a Finally block.… Read more