Home About

 November 18th, 2008

Using Delegates in C# - 1

What is a delegate and why would you want to use them?

Calling methods with parameters comes natural in programming, but what if you would like to pass the methods themselves to another method?

To give an example: You might want to set a timer and have the timer call a particular method when the time comes. To avoid having to hard code each possible action together with its own timer you might want to pass the action method in your call to the timer itself. In C# this is called delegation.

Read the rest of this entry »

 November 17th, 2008

Building a TCP/IP server using C# - 14


Dozens of protocols have come and gone (does anyone even remember IPX/SPX?) but both TCP & UDP over IP survive. C# offers a good deal of libraries for handling connections both on the server and client side. Here we look at how to build a simple server in increasing steps of complexity.

Read the rest of this entry »

 November 17th, 2008

Obtaining System information through Environment.* in C# - 0

Several bits of basic system related information on the environment, working directory, memory use etc can be retrieved through the Sytem.Environment class. The class also contains functions that allow you to quickly terminate your program for when don’t want to properly clean up.

Read the rest of this entry »

 November 15th, 2008

Passing by Reference and Value in C# - 2


C# might look a lot like C++ but that doesn’t mean that everything is as it appears to be. There are some gotcha’s that can trip you up.

Read the rest of this entry »

 November 15th, 2008

Code commenting techniques in C# - 0

When writing new code everything seems so obvious that there is hardly a need to code any comments. But then you get that highly tuned and several times rewritten code library the company has been using for 20+ years. Attached to it is a note asking you to recode it in C# before the weekend.
Read the rest of this entry »

 November 14th, 2008

From C to C++, Java and C# - 0

A little trip through memory lane and how programming has changed. Starting with the birth of C through to C#. The software world has become that little more complicated since the time share ASCII teletype systems.  Chinese input, Arabic display, USB devices and gigabytes of memory are standard these days.

Read the rest of this entry »

 November 14th, 2008

How to get started with C# - 2

Time to get going on that C#. So which road to take? Should you go the Microsoft way, or gain your stripes as a Linux guru? You can have it both ways and here I go into how to install a free C# development environment on either Windows or Linux.

Read the rest of this entry »


Recent Comments
  • Ales: Hi, Thanks for the code… I must say I did not experience any errors decrypting any of my messages. I even...
  • JC: Thanks very useful and well explained
  • Thomas: This is a public static class written in the C# language that does not save state. You can call into the...
  • Simon: Thank you very much for this post! It helped me essentially to overcome obstacels to work with mono!
  • Graham: This is a good research for keyboard shortcuts! Some shortcuts are also compatible for Windows OS. I have...