C#/.Net – first tastes

I have just done a little bit of serious C# coding and thought I’d share some reactions.

Overall impression is pretty favourable. If you are only interested in developing for Windows desktops, it will be pretty hard to beat. For GUI construction, it’s all very VB like, without the VB funkiness.

The Visual Studio IDE is really nice. I’ve used Visual Studio in a past life (C++) and I found this version to be more forgiving. In the past, some things were very hard to undo. My PC did crash horribly twice while running it. This wasn’t a blue screen, just a whole load of vertical stripes, which was pretty jarring. I’m not sure if this is related or some hardware glitch developing. Have to wait and see on that.

C# is pretty easy for crusty Java programmers like myself to pickup. It’s full of syntactic sugar, as Matt would say. Let’s hope it doesn’t rot my programming teeth, so to speak. The libraries are unsuprisingly similar to the Java libraries. I was surprised, however, by the omission of a Set collection. Using a hashtable also had some oddities as it complained when I added the same key twice. Huh? You’ve got to use the [] operator thing for that. Why not a Put method? No doubt a lot to do with my java mindset, but these little things made me feel that it somewhat immature. Alternatively, perhaps collections libraries are just degrading over time – we used to have MultiMaps in C++, after all.

The case conventions for methods, fields and properties don’t seem as consistent as Java. Might just be a case of getting used to that. It’s amazing low strongly those Java conventions have become ingrained, so much so that methods starting in upper case appear odd.

Anyway, I’ll keep playing with C# …

One Reply to “C#/.Net – first tastes”

  1. Hi !

    I’ve been a Java programmer (Mostly Swing) for about 3 years and a .Net developer for 6 months.

    My first impressions were very good ( Visual Studio, for each, iterators etc.) but after a couple of weeks of experimentation, I felt Java was still superior.

    Swing kicks WinForm’s butt. It is way more flexible and consistent. Using WinForms, it is a lot harder to customize the look and feel. And even though it uses some kind of MVC pattern, it isn’t always consistent. For example, in some controls, you can use a collection of objects as a DataModel (Like Swing components) but with other controls, you need to use Strings !! that’s weird.

    Anyway, c# can be usefull to quickly build an application, but I still prefer Java and Swing over .Net.

    Oh, and WinForms use a lot of ram just like Swing.

Comments are closed.