So that's the deal then, c# has:
1)
using statement >> blocked try/finally with block encompassing created object's scope (can't be used outside of encompassing block) and finally calling objects required IDisposable.Dispose():
using(MyObject o = new MyObject)
{
....
}
2)
xml commenting. Should be added to
vb in the future.
3)
destructor that (like using above) gets converted into a finalize method that has a try/finally with the finally calling the base classes finalize.
4)
Could have sworn I saw a couple other things in books possibly with com+ or remoteing or so, but can't remember them now.
I know there's other differences, but they haven't affected me as yet. There are those who say these languages will divert from each other over time. Me, I feel they'll track each other with c# taking precedence because the MS programmers are using that.
I don't get this event's thing being easier in
vb as when I type:
myobject.myevent += I get to hit a tab button that finishes up the subscription and adds a handler. I think the real problem here isn't that one's easier than another, it's that
vb programmer's make a poor attempt at c# programming, and c# programmers make a poor attempt at
vb programming. My suggestion for both groups is to get a professional book on the other language and read it. If you're a
vb programmer and haven't done a += event subscription, gotten the "tab to finish" popup and used it, you don't know c# very well (I'm using 2003).
On that note, I'm a c++ programmer, so naturally didn't read a c# book either. I'm finding it very useful to read a good c# book. There's about 25% going on there, I didn't know about. Sure, I could code just fine, just like I could in
vb, but now I'm much better and faster. I think I'll do the same with
vb next. It's the little things that count. I haven't looked at them in 2005 beta, but then again, they're not done with that yet.