ZDNet UK


Skip to Main Content

ZDNet.co.uk - Winner of Best Business Website 2007
  1. Home
  2. News
  3. Blogs
  4. Reviews
  5. Jobs
  6. Resources
  7. Community
  8. My ZDNet

 

ZDNet UK RSS Feeds


Application development Toolkit

Why you should move to C#

Craig Utley Builder.com

Published: 07 Nov 2002 11:13 GMT

  • Email
  • Trackback
  • Clip Link
  • Print friendly
  • Post Comment

XML comments
C# supports the introduction of XML comments. Far from being just another way to add comments to code, XML comments can actually turn into your documentation. The comments are placed into XML format and can then be used as needed to document your code. This documentation can include example code, parameters, and references to other topics. It finally makes sense for a developer to document his or her code, because those comments can actually become documentation independent of the source code.

Not just Microsoft
C# is not just about Microsoft anymore. Microsoft released C# to ECMA (take that, Java programmers!) and it has been published as a standard. In addition, the Mono project is an effort to make an open source version of the .Net Framework (a subset of it called the CLI) and an open source version of C#, all for Linux. You can read more about Mono and download it here.

All about components
Creating components is straightforward, as is referencing those components in code. Namespaces in C# replace a lot of the headaches from the COM world in which you had to perform registry lookups and instantiate objects and worry about such things as IUnknown and IDispatch. Using C#, you simply import a namespace and then begin using the classes in that component--no registry lookups or COM plumbing required.

The power to be unsafe
Much is made about C#'s type-safety, but if you want to drive without a seatbelt, you are free to do so. If you really need to use pointers, for example, you can use the unsafe keyword to mark a block of code. This allows that code to bypass the Framework's type-safety checking and means that you can directly manipulate memory. This makes C# incredibly powerful and is one of the advantages of C# over VB.Net.

Cross-language capabilities
C# has the ability to allow you to interoperate with any other language on the .Net platform. Much has been said about how you can create a component in one language and inherit and extend that component in another language, which is something that was difficult, if not impossible, with COM.

C# also supports the concept of error handling across different languages. Gone are the unfriendly HResults; instead, you have access to .Net exceptions, which are consistent across any .Net language.

It might be worth more
When it comes to creating applications for .Net, the choice between VB.Net and C# is typically not important. However, it is quite possible that companies are willing to pay more for C# developers; C++ developers have typically been harder to find than VB developers and have been better compensated. It's likely there will be more VB.Net developers than C# developers, so this trend may well continue into the future.


Have your say instantly in the Tech Update forum.

Find out what's where in the new Tech Update with our Guided Tour.

Let the editors know what you think in the Mailroom.

Next

Previous

1 2


  • Email
  • Trackback
  • Clip Link
  • Print friendlyPrint with Konica

Did you find this article useful?
48 out of 91 people found this useful


Full Talkback thread

0 comments


Company/Topic Alerts

Create a new alert from the list below:











Discussions

erijustice erijustice

Beware

Tuesday 7 October 2008, 6:10 AM

2 comments
sunsj sunsj

xG update - money, mystery and more

Tuesday 7 October 2008, 4:44 AM

3 comments

Featured Talkback

In association with Intel
The fact is: Software developers today are really designers and not coders. The reason that business anlaysts exist today to model solutions is because they understand the value of designing software before writing it. All too often developers create code that has little value because they do not understand that business classes interact with other classes within the confines of a working model or pattern.

By: 1000165269

Read full story:
Making sense of agile modelling