1. Computing & Technology

Latest Programming Tutorials

About C, C++ and C# brings you tutorials for C Programming, C++ Programming and C# Programming; part works built up week by week. Choose C, C++ or C# or all three.

Latest Programming Tutorials
C / C++ / C# Spotlight10

Wintellect Power Collections for .NET

Monday May 14, 2012

Although it's almost five years old, this collection of collection classes is still very handy to have and compliments that which comes with C# 4.0. Wintellect is a name associated with Jeffrey Richter who wrote the C# CLR book which I'll be reviewing shortly.

The code has a good reputation; it's well written and includes a set, deque, a bag, biglist, multi dictionary and ordered dictionary as well as some similar to those with C# 4.0 (Dictionary, Hash). It comes with a .chm (Windows Hypertext help file) documenting it. Don't forget to right click and unblock that or it won't work.

Friday Puzzle and Empire AI Design Doc

Sunday May 13, 2012

I asked if the C# was valid (it was) and what the values of a and b would be. It was valid C# with a = 1, b = 2. As the two variables are static they have a default value of 0 before the initializers are executed.

Empire AI Design Doc

Before the Empire C Game programming tutorials start, I thought I'd explain how the AI for the computer player will work. You can read it in the Computer Empire AI Design Spec, the first of 2 or 3 tutorials on the AI.

Programming Puzzle + Mud Server

Saturday May 12, 2012

The Thursday puzzle was C# as correctly guessed. It's a little known fact that the @character is valid in an identifier and this allows lines like class @class etc.

You can find this and other interesting but obscure parts in the C# 4.0 language specification. There's a 2.9MB downloadable htm version of it available from Microsoft.

Mud Server

In a past article I suggested it would be possible to create a Mud Server. Actually a bit more powerful than Mud, more accurately described as a text interface MMO, that can be accessed via a web browser so I'm having a go at writing one.

I've published the first spec. which is more of a design document and says how it's going to be implemented.

Programming puzzle Is this C# Valid?

Friday May 11, 2012
using System;

class Test
{
   static int a = b + 1;
   static int b = a + 1;

   static void Main() {
      Console.WriteLine("a = {0}, b = {1}", a, b);
   }
}

Without compiling it, can you say (a) if it will compile and (b) if it does, what values will it output? Answer on Sunday

Discuss in my forum

©2012 About.com. All rights reserved.

A part of The New York Times Company.