In June 2000, Microsoft announced both the .NET platform and a new programming
language called C#. C# is a simple, modern, object oriented, and type-safe programming
language derived from C and C++. C# (pronounced “C sharp”) is firmly
planted in the C and C++ family tree of languages, and will immediately be familiar
to C and C++ programmers. C# aims to combine the high productivity of Visual
Basic and the raw power of C++.C# is a strongly-typed object-oriented language
designed to give the optimum blend of simplicity, expressiveness, and performance.
The .NET platform is centered around a Common Language Runtime (similar to
a JVM) and a set of libraries which can be exploited by a wide variety of languages
which are able to work together by all compiling to an intermediate language
(IL). C# and .NET are a little symbiotic: some features of C# are there to work
well with .NET, and some features of .NET are there to work well with C# (though
.NET aims to work well with many languages).
to the same rich class libraries that are used by seasoned tools such as Visual
Basic and Visual C++. C# itself does not include a class library.
Why C# .NET?
One of the biggest questions that developers need to answer
is why they need yet another language? The computer world is literally
swimming in computer languages of various types. You can find a language to
do just about anything today, and some of them do more than one task well. However,
the problem isn’t one of a need for new language constructs. Languages such
as Visual Basic, Java, and C++ have the bases covered in that arena. In fact,
C# detractors rightly point out that C# is the Microsoft version of Java, although
we’ll see that the similarities are superficial as the book progresses.
C# is an answer to a new problem: developers need a language that
works well in a distributed programming environment. Applications no longer
sit alone on local area networks (LANs) or in remote access scenarios between
satellite offices. The application you build today might be in use on a partner
corporation desktop tomorrow. The biggest problem developers face is that they
really don’t know where the application will end up. The application they create
at design time may end up performing other tasks later on. The decision to move
the application comes later, long after you’ve finished writing it. Consequently,
the application has to be robust enough to work in remote settings across company
Companies also force developers to complete applications faster
today. In days gone by, it wasn’t unusual for an application development cycle
to last a few years. Today, companies measure application delivery schedules
in months, and the developer doesn’t get many of them. C# helps developers produce
more code more quickly than ever before. However, producing code quickly doesn’t
buy you much on its own; the code must also be free of bugs, and C# helps answer
that need as well.
First Program in C# .NET – “Hello World”
C# .NET programming language is quite straight forward and simple to use programming language. Here is the most simplest program that can be written in C# .NET programming language. The detailed information can be found in the coming tutorials.
using System; // Calling Namespace
namespace helloworld // Defining Namespace
class MainClass // Defining Class
static void Main(string args) // Program Entry Point
Console.WriteLine ("Hello World"); // Print Hello World