In Tune with C#

Microsoft's new C# language combines Visual Basic's ease of use with Visual C++'s power and flexibility.

Michael Otey

October 18, 2000

1 Min Read
ITPro Today logo in a gray background | ITPro Today

Some people might see Microsoft's new C# language as a backlash against Sun Microsystems' lawsuit against Microsoft over Java. C# (pronounced "C sharp") is currently in beta, and Microsoft plans to release it initially as part of Visual Studio.NET. However, Microsoft intends C# to be, like its musical namesake, one step above C. The new C# language combines Visual Basic's (VB's) ease of use with Visual C++'s (VC++'s) power and flexibility. C# also incorporates Java's most important language features.

C# is a fully object-oriented language that should be familiar to VC++ developers. However, C# introduces several new features, including type safety and automatic garbage collection, while simultaneously eliminating frequently troublesome concepts such as pointers and multiple inheritance. C#'s type safety doesn't allow unsafe casts (data conversions), requires all objects to have valid references, and always initializes dynamically allocated variables to zero. With automatic garbage collection, you don't have to manually implement destructors for every object, and C# automatically removes from memory all objects that a program no longer references.

Pointers, while powerful, can also be a constant source of problems, as C programmers can tell you. Like Java and VB, C# doesn't support pointers when producing managed code. C# developers have also left out support for multiple inheritance—a source of potentially unending confusion. C# supports all other object-oriented features, such as polymorphism, encapsulation, and standard inheritance. You can download the complete C# language reference at http://msdn.microsoft.com/vstudio /nextgen/technology/csharpdownload.asp.

Read more about:

Microsoft
Sign up for the ITPro Today newsletter
Stay on top of the IT universe with commentary, news analysis, how-to's, and tips delivered to your inbox daily.

You May Also Like