What is it?
C# is an object-oriented programming language from Microsoft that is based on C++ with elements from Visual Basic and Java.
Although Microsoft is steadily increasing the number of languages supported and integrated with .net, C# is the most natural fit. Compiled as managed code, it makes use of the services of the Common Language Runtime. C# 2.0 is fully integrated into .net 2.0 and Visual Studio 2005.
By submitting your personal information, you agree that TechTarget and its partners may contact you regarding relevant content, products and special offers.
Until recently, people from a C, C++ or Java background tended to opt for C# for .net development, while those with Visual Basic skills stuck to Visual Basic .net, but according to Anders Hejlsberg, co-creator and lead developer of C#, Visual Basic developers are starting to migrate to C# too.
Where did it originate?
Hejlsberg joined Microsoft after creating Turbo Pascal and its successor Delphi for Borland. He worked on Visual J++ and the Windows Foundation Classes before moving on to C# and .net. C# 1.0 was released in 2001, following an unprecedented open source-style public consultation, after which Microsoft submitted the language to standards body the ECMA.
Jesse Liberty, O'Reilly and Associates' lead author on C#, has a different explanation of the origin of the language, which also explains why Visual Basic .net was so different to Visual Basic 6.
"The nasty little secret about .net is that Microsoft really created only one language for the .net platform. This language is called Microsoft Intermediate Language (MSIL). It then created two coatings for MSIL. One looks a lot like C++ or Java, and was named C#; the other looks a lot like Visual Basic 6 and was named Visual Basic 2005," he said.
What's it for?
C#'s champions say that a major advantage over Java is that C# was designed from the ground up for component-based development. Lacking a runtime library of its own, it uses the .net Framework's Runtime Class Library.
What makes it special?
Garbage collection eliminates much of the debugging and memory leak-plugging drudgery. Like Visual Basic .net, C# is type-safe, meaning that programs can only perform and access objects and memory locations in specified ways. It has the full range of object-oriented features and is no longer dependent on cumbersome external technologies such as Com.
How difficult is it to master?
C and C++ developers will soon find their way around, although apparent similarities in syntax may prove false friends. On its website Microsoft has laid out a red carpet for Java developers willing to make the change, and there is also a free download for learners and hobbyists, Visual C# Express.
Where is it used?
According to the SSL/Computer Weekly Survey of Appointments Data and Trends, the number of C# job advertised has doubled over the past year, and C# is now one of the top 10 most requested skills.
What systems does it run on?
Mostly Microsoft's, although it is intended to be supplier- and platform-independent. See also Borland's C#Builder and open source initiatives such as the Mono Project's CSharp Compiler.
What's coming up?
Details of C# 3.0, including the language specification can be downloaded from the Microsoft Developer Network.