I’ve been sent on a C# 2.0 in Laaaandon. I’ll try and pronounce C#2.0.
Hmmm. C, that’s either k or Sea. I’ll go with Sea.
#, mmmm, hash I reckon.
2.0, easy. That’ll be Beta.
I love Laaarndon.
Anyway, I’ve done a bit of C++ and I was really impressed with the new C# 2.0. Here’s some code using C++.
and here’s some doing much the same thing in C# 2.0. (It’s not really 2.0 as I’ve only got .Net 2003 on my machine at home, but it’s not that different)
What you’ll notice here is that C# 2.0 has doesn’t use the annoying printf function when printing lines to the console. It uses the Console.WriteLine method. This does away with having to remember what sort of variables you are using when displaying a line of interesting information to the console. In C# 2.0 you simply concatenate them using the + character.
What makes it great, as C just got better, is the fact it’s such an encouraging language. It automatically puts class near the top, which I think is a nice touch. This must be down to my language settings, as I’d imagine the default must be something like Woooagh, That Rocks Dude.
I’ll update you with day 2’s findings when I get back tomorrow.