This post is meant for complete beginners and assumes that you have no programming experience. In this post, we are going to talk about C# and other questions around it like why C# is a good choice? how to code using C# etc.
What is C#?
C# is a simple, yet powerful object-oriented programming language used to create a variety of applications like any other programming language (Web development, desktop applications, console applications, Game development, backed development, etc.).
C# is a general-purpose, multi-paradigm programming language encompassing strong typing, lexically scoped, imperative, declarative, functional, generic, object-oriented (class-based), and component-oriented programming disciplines. It was developed around 2000 by Microsoft.Wiki
There are various reasons which makes C# is good choice for novice and for professionals
- The language is a simple, modern, general-purpose, object-oriented programming language.
- Unlike C++, for instance, C# offers automatic memory management.
- It also offers strong type checking, array bounds checking, detection of attempts to use uninitialized variables, and automatic garbage collection. Software robustness, durability, and programmer productivity are important.
- The .NET framework includes hundreds of libraries for working with the file system, managing security, and more.
- Microsoft heavily supports C#, issuing fixes and updates rapidly – so it’s a more readily updated language compared to other languages, such as Java.
- Like Java, C# is one of the most popular programming languages, and as such, it has a large, active user community, making it easy to find troubleshooting solutions.
How to program in C#?
Like other programming languages, to start with C# development we need IDE (Integrated Development Environment is a software application that provides comprehensive facilities to computer programmers for development).
To write a program in C#, we need Visual Studio. In Visual Studio, we can make a variety of applications including but not limited to the following:
- Console Applications
- Windows Forms Applications, also known as Desktop applications
- Web Applications
- Mobile Applications
A console application is an application that runs in a console window same as a C and C++ program.
it takes input and displays output at a command-line console with access to three basic data streams: standard input, standard output, and standard error.
Windows Forms Applications
Windows Forms (WinForms) is a Graphical User Interface (GUI) class library which is part of .Net Framework. it is one that runs on the desktop computer. A Windows forms application will normally have a collection of controls such as labels, text boxes, list boxes, etc.
I believe you know about the web application as to read this article you are using the web application. (A web application is application software that runs on a web server, for an example website)
A mobile application, most commonly referred to as an app, is a type of application software designed to run on a mobile device, such as a smartphone or tablet computer.
Visual Studio Installation
From Visual Studio origin, there are various versions of Visual studio’s. To download visual studio on your machine Go to the below-mentioned link to download the Visual Studio. (Community version of Visual Studio is totally free)
Steps of Visual studio installation
Step 1 – Browse the link https://www.visualstudio.com/downloads/
You can select (below version might change)
• Visual Studio 2017 Community Edition (Free)
• Visual Studio 2017 Professional Edition (30 Day Free Trial)
In this tutorial, we will install the Professional Edition
Step 2 – Click on the downloaded “exe” file, In the next screen, click continue.
Step 3 – Visual Studio will start downloading the initial files from the internet. It will display download speed.
Step 4 – In next screen, click install
Step 5 – In next screen, select the option which you want to install
- For our tutorial will need “.Net desktop development” so select it and you can choose other options too.
- Click install
Step 6 – Visual Studio will download the relevant files based on the selection in above step
Step 7 – Once the download is done, it will be asked to reboot your machine
Step 8 – after reboot, open the Visual Studio IDE
- Select a theme of your choice
- Click Start Visual Studio
Step 9 – In Visual Studio IDE, you can navigate to File menu to create new C# applications