Reading: It's what's for dinner.

Published February 17, 2006
Advertisement
You know, I have this terrible tendency to assume that I know everything. I think it's one of my biggest character flaws.

So when I heard about C# 2.0 having Generics and a bunch of other stuff, I simply tuned out all the other stuff, because at a brief glance, they didn't seem all that important to me. Generics was my new best friend, and by gosh that's the important part.


In my most recent project, Generics have been used to significantly improve my code, but there are a lot of places where I found myself doing things, and saying to myself "There's got to be a better way!". Today, I was just randomly flirting around the internet, and I came across an article about the new C# 2.0 features (hello and welcome to last year and such, yeah yeah), and I decided to finally sit down and read it.


Whoa.


I've found myself coding around things in C# that I wanted to accomplish, but didn't realise that C# already supported them.

Eek!~

That'll learn me.


Anonymous methods. Well damn. These will help greatly with a lot of things where I have 5 billion tiny little one-use functions. I wish I had known about these sooner.

Property visibilities. Well double damn. How many times did I abandon using a property and went to using two functions simply because I wanted a public get and a protected set? Many.

Static classes. No more "cleverly private default constructors" for me, thank you!



So, I guess the lesson to be learned here is: Read about the new features of the tools you use. You may save yourself a lot of time.
Previous Entry Sigh
Next Entry New Product
0 likes 3 comments

Comments

Rob Loach
I've been wanting to get into that stuff for a while now, but never really saw that need. Maybe I should take a look......
February 17, 2006 11:52 AM
Mushu
I had that exact same experience with condoms.
February 17, 2006 03:14 PM
johnhattan
C# = Java with all of the crap scraped off

Is there yet a reasonable way to do web applets with C#? I'm too goldurned lazy to look it up, and the only applets I see are in Flash or Java, so I'm assuming.
February 17, 2006 03:47 PM
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Advertisement
Advertisement