Pages

30 June, 2010

Max/Min revisited

A kind commenter on my last post (thanks Matt) told me about an alternative to my Max/Min implementation.  The .NET framework includes a class library called LINQ (Language INtegrated Query).  In looking through the MSDN library I had seen this mentioned, but figured it had something to do with database queries.  I was partly right, but it turns out that LINQ is far more, and allows an alternate solution to Prashant's second exercise.

23 June, 2010

Exercise 2 – Fibonacci, and other things

Prashant’s second exercise is:

Fibonacci series, swapping two variables, finding maximum/minimum among a list of numbers.

So in this post we get to play with a bit of recursion, and I’ve thrown in some parametric types for good measure.

19 June, 2010

C#’s type system

C# is a strongly-typed object-oriented language.  Many of the types will appear familiar, at first glance, to those who know C or C++, and most C expressions will behave similarly in C#, but the C# type-system is fundamentally different.

In my previous post I introduced C#’s integral types.  In this post I’ll look at C#’s type system.

16 June, 2010

The First Exercise

The first item in Prashant’s list of 15 Exercises for Learning a new Programming Language is:

Display series of numbers (1,2,3,4, 5....etc) in an infinite loop. The program should quit if someone hits a specific key (Say ESCAPE key).

So this post we start to look at loops and integer types.

07 June, 2010

Hello, World! – again

In 15 Exercises for Learning a new Programming Language, Prashant Mhatre kicks off with:

First of all, get familiar with Compiler, compiler option, editor shortcuts or integrated development environment (IDE). Start with a simple ‘Hello World’ program. Compile it. Use basic functionalities of debugger like setting break points, printing variable values, moving to the next or specific position, stopping debugger etc.

Let’s jump straight into the code first.

Where to begin?

So the first thing to do when learning a new language is obviously to find some reference materials. In this post I’ll look at C# references.  I’ll leave .NET to later, when we start to get into it.

Hello, World!

That’s an appropriate title for the first post, on the first blog, of a guy who’s starting to learn a new programming language.