Dutton's blog

Returning errorlevels from C# applications

Something came up today which turned out to be a bit of a blast from the past. If you want to check the return value of a C# console application (for use in an old school batch file for example) you can't rely on the return value of main (as you would in C for example), but have to set the value of System.Environment.ExitCode instead. The advantage to this over a single return statement is this call sets the exit code and won't actually exit your program at that point, see below.

static void Main(string[] args)
{
	// program code...
	// now set the return value to 1
	System.Environment.ExitCode = 1
}

This example returns 1, which can then be picked up by some good ol' fashioned batch command-goodness. I'm already reminiscing back to my 1000+ line BBS mailer batch file back in 1995!

Also came across this which provides guidance on the special meanings of some exit codes.

Experience Seminars - Understanding your digital EOS (Part 1)

I've just come back from attending Experience Seminar's "Understanding your digital EOS (Part 1)" course at their training centre in Huntingdon and was thoroughly impressed.

I've owned a Canon dSLR for a few years now (originally a 350D and more recently upgraded to a 40D) and although I had a basic general understanding of concepts like aperture, exposure and ISO, and tried to apply them to my photography, shooting mostly in Program mode, it was great to have some of the chasm-like gaps in my self-taught knowledge filled in.

The course covered what they call the "Basic Overrides", and included topics such as AWB, WB presets, ISO and using 'Tv' and 'Av' modes to control aperture and shutter speeds independently, before finally working towards Program mode. The course content was backed up with image slideshows containing loads of example situations (fast moving objects, portrait, landscape, low light, fireworks, etc) along with guidance on which settings would produce the best results in the form of the image EXIF information alongside. For me this part was the most useful as it often took seeing a picture at a particular aperture or shutter time setting to make sense of it all.

Their training centre is well laid out and professionally ran and although a bit remote, is easy to get to by car and is surrounded by beautiful Cambridgshire countryside. I only regret not getting there earlier in the morning to take some shots!

I'm enrolled on their Part 2 course later on in the year so I'll report back.

Hi!

Hi,

I don't expect anyone to be reading this, but if anyone does happen to find this blog somehow, Hi!

I'm currently playing with themes to try and find the 'right' one so bear with me.