Join Gerry O'Brien for an in-depth discussion in this video A brief history of C#, part of Learning C#.
Let's take a look at the history of the C# language, to see where it came from and how it plays a role in developing applications today. First of all, let's take a look at how to pronounce the name. Most of us look at the symbol after C and see it as a pound symbol or a hash symbol. Although the name for the product is actually C-Sharp, not C-Pound. Now that we've got that out of the way, let's take a look at the rest of, the C# language. It's currently an ECMA-334 standard language, which means that Microsoft has submitted it, for standardization, which allows it to be a cross-platform language.
We'll talk a little bit about that in a moment. It was built from the ground up to be an object-oriented programming language. This means that it supports all three pillars of object-oriented programming. It also has support for component-oriented programming, which basically means that you can create self-contained and self-describing software components for code reuse in your applications as well as other applications. It is also a type-safe language, meaning that the .net framework and the compiler will perform checking tasks on your use and assignment of values to the variable types in your code.
This ensures that you're using the types correctly. In the event that you generate a variable to store a character value, and you attempt to store some other data type in it, such as, an object. So how does it fit within the programming world, and within Microsoft's strategy for programming languages in general? Well it's part of the Microsoft .NET framework. And the .NET framework is a foundation for services and for programming applications. C# is considered to be a C-based language. This means that it has similarities to C, C++, and Java.
So if you're familiar with those languages, you should be able to learn C# with little to no effort. C# is also a language that allows you to create applications across different platforms. The .NET framework, like Java, attempts to provide you with a, write once run anywhere mentality for your code. This basically means that you write your code in one development language, and you have the ability to run it on many different platforms. Although C# and Java don't provide complete cross platform compatibility across every platform, they do provide support for various platforms in use today.
C# allows you to create applications for Windows desktop computers, for tablet computers, and for smartphone platforms. For example, you can create a C# application that will run on the Apple iOS operating system through the use of a separate tool called Xamarin.iOS. If you want to deploy to Android operating systems running on tablets and smartphones, you can use Xamarin.Android. And finally, the Mono project has allowed the port of C# to the Linux platform.
Using Mono, you can write C# code and have your applications execute on, any of the Linux platforms that support Mono. So this is a quick introduction to the C# language. Being a first-class language in the .NET framework, C# provides you with full object-oriented programming capabilities and supports all of the .NET framework functionality for services and application programming. It is similar in syntax to other C-based languages like C, C++, and Java. Meaning, if you know those languages, your learning curve is relatively small for getting into C#.
Learning this language provides the opportunity to create and run applications across many different platforms.
- Installing C#
- Working with loops
- Controlling program flow
- Using variables
- Building functions
- Creating and instantiating classes
- Catching errors
- Managing resources with the garbage collector
- Building collections