C# Introduction
Photo Credit to CodeToFun
🤔 What is C# Programming? #
C# (pronounced "C sharp") is a modern, multi-paradigm programming language developed by Microsoft.
It is designed to be simple, efficient, and type-safe, and is used primarily to build Windows desktop applications, web applications, and games.
C# is an object-oriented language that allows developers to create modular and reusable code, making it easier to maintain and scale large applications.
👴 Who is the Father of C#?
Anders Hejlsberg is considered the father of C#. He is a Danish computer scientist who created C# while working at Microsoft in 1999, with the aim of creating a modern, object-oriented programming language that could be used to build a wide range of applications for the Microsoft ecosystem.
💰 Is C# a open-source?
Yes, C# is now an open-source programming language. The open-source version of C# is called the "Roslyn" compiler, and it is available under the MIT license, which allows developers to use, modify, and distribute the language freely without any legal restrictions.
📄 Hello World in C#
Here's an example of a simple C# program that prints Hello, World!
to the console:
using System;
class HelloWorld
{
static void Main(string[] args)
{
Console.WriteLine("Hello, World!");
}
}
Let me explain the above code:
- This program uses the
Console.WriteLine()
method to output the message "Hello, World!" to the console. - The
Main()
method is the entry point of the program, and it is where the program starts running when it is executed. - The
using System;
statement at the beginning of the program indicates that the program is using classes from the System namespace, which includes classes for working with the console, files, and other system-related tasks.
💻 Output
Hello, World!
🤯 Fun Fact
Did you Know?
The "#" symbol in C# is often referred to as the "sharp" symbol, which is how the language got its name.
👨💻 Join our Community:
Author
For over eight years, I worked as a full-stack web developer. Now, I have chosen my profession as a full-time blogger at codetofun.com.
Buy me a coffee to make codetofun.com free for everyone.
Buy me a Coffee
If you have any doubts regarding this article (C# Introduction) please comment here. I will help you immediately.