C# Miscellaneous

Introduction OpenGL is an abbreviation of “Open Graphics Library”. Writing an OpenGL Program First of all, we have to satisfy the minimum requirement for setup the window to display the openGL graphics.  Windows GDI needs a Device Context (DC) to draw the graphics, but openGL uses Rendering Context (RC). we can use multiple rendering context [...]

Consider the following problem. You are given the maze figure below and asked to find a way to the exit with a minimum number of decisions to make (a decision is required whenever there is at least one available direction to go). At the right of the maze figure we have pointed out these critical [...]

What is a graph ? The name may suggest something that has to do with graphics, which in a way is true but graphs are generally more than that. Their main use is at describing relationships between various entities in the real world. For example consider four persons – call them Mary, John, April and [...]

A memory leak is what happens when you forget to free a block of memory allocated with the new operator or when you make it impossible to do so. As a consequence your application may eventually run out of memory and may even cause the system to crash. I will now give you a few [...]

So you have just finished your program and you would like to see it at work. Usually you press a combination of keys to compile and run it. But what actually happens when you press those keys ? The compilation process translates your code from C++ to machine language, which is the only language computers [...]

This article is a small game using graphics in c++ (DOS Based). I programmed this game and all of the graphics design are the creations of my friend Amit Mehta. “This is a simple game for new programmers. It will help them to get a clear view of 2D Graphics The output is a game [...]

I had the below problem with the Math.Round() function: Problem :   When I use the Math.Round Function it uses the Bankers Method. (ie., Round(5.5) = 5 and Round(5.50001) = 6). But when I use the Format String  “{0:F0}” it uses the proper Mathematical Method.(ie. Round(5.5)=6). Why this inconsistency followed in .NET?       Is [...]

Motivation Sometimes, while writing programs, we can get into situations when we need to measure execution times of various tasks. Each programming language provides some mechanism to retrieve the current time from the system. If we read and store the system time at various moments, we can compute time intervals by substracting the values of [...]