An easy and light way to learn C# Language

• In the name of Allaah (God Almighty)

• Peace be upon you...

• If Allaah wills

• Now we're going to start learning the basics of C# language, step by step:

~ Here we are learning about:

1. How to pronounce C#?

• It is pronounced as "C (see) sharp."

2. What is C# or C Sharp?

• C# is a programming language used to develop various applications such as desktop or laptop software, web, mobile, etc.

3. What other things are required to learn and practice C#?

• There are no specific requirements to learn C# if you are a beginner and willing to learn, in shaa Allaah, i.e. if God wills, you surely will benefit from here, but it is preferable if you have some understanding of the programming language of C, basic mathematics, some logics, etc.

• As for the practice, you can practice anywhere, such as on any paper, computer notepad, online compiler etc. but the best recommendation is to practice on Microsoft Visual Studio or Visual Studio Code, which will help and guide you to practice more efficiently.

• Lesson-1, Introductions

~ Now, we will learn about MS Visual Studio and Visual Studio Code.

4. What are Microsoft Visual Studio and Visual Studio Code and which one should we choose?

• These are code editors.

• MS Visual Studio is a complete, heavy and powerful editor with an Integrated Development Environment (IDE) and Graphics User Interface (GUI). It allows you to write and edit code at the same time visualize, analyze, debug, build and many other things for your applications. You can also use toolbox items to develop a user interface or front-end (i.e., form design) without using any code. Therefore, if you want to be a combined developer of using toolbox and codes, want to practice coding on Windows applications, and your pc or laptop system can handle a heavy editor while working on multiple applications, then this editor is a perfect choice. This is the editor that I personally use.

• On the other hand, Visual Studio Code is a lightweight, code-based but powerful source code editor where you can write, edit code and build your applications, However, it does not support IDE and GUI to visualize, analyze, or see form design while writing code but it does support almost all major programming languages. Therefore, if you are a beginner who wants to be a code-base developer, and you are not concerned about toolbox or UI, or if you simply want to practice coding on Console Applications and your pc or laptop system can handle this editor, then this is the best option for you.

• Lesson- 2 About Code Editors

~ Now, we will learn about coding and bugs.

5. What actually Coding or Syntax is?

6. What is a Bug?

~ Coding means writing in code words or syntax that a computer or system can understand to execute a program. If the specific programming language doesn't match with the correct syntax, it gets errors, and the program cannot be executed until the bugs are fixed.

~ The term 'bug' is used in a computer program to indicate an error.

~ For example, to get output from a program in C# on a Console Application, you have to write this line of code:

Console.WriteLine("Here is what we want to show");

• If we miss the right syntax, such as forgetting to put a semi-colon at the end: Example:

Console.WriteLine( "Here is what we want to show" )

• Or misspelling, such as writing Cosole instead of Console: Example:

Cosole.WriteLine( "Here is what we want to show" );

• Or changing the word from capital to lowercase or vice versa, unless it is between double quotation marks (i.e., a string "Something written here" ):

Examples:

Console.Writeline( "Here is what we want to show" );

Or

Console.WRiteLine( "Here is what we want to show" );

~ These mistakes are called bugs or errors.

* Note: If Allaah wills, Later, we will learn more details about the string and String.

• Lesson- 3, About Syntax & Bug

~ Now we will learn about the types of applications.

7. How many types of applications can be developed using the C# language?

~ There are commonly four types of applications that can be developed using the C# language, but there are others on the list as well.

The four applications are:

1) Console Application: also known as a Command Prompt, it's like MS-DOS operating system.

2) Windows Application: also known as a desktop application, designed for Microsoft Windows.

3) Website or Web Application: that runs on a computer server and different platforms (or operating systems), such as Windows, Mac, Linux etc.

4) Mobile Application: that runs on the App Store for mobile devices and tablets and different platforms (or operating systems), such as Android, iOS, iPad, Windows Mobile, etc.

• Note: There are other applications available, but for now, we are not focusing on those. If needed, in shaa Allaah, we will discuss them later.

• Lesson- 4, About Types of Applications

~ Now we will learn about the Console Application.

8. What is a Console Application and why should we learn about it?

~ A Console Application is an application that deals with text input and output. It is also known as a command-line interface (CLI). In a Console Application, there are no buttons to click; you simply type codes and press enter to execute a command, and the result is displayed as text output. This environment allows us to learn and practice C# code to perform various operations, making it an excellent way to learn and practice the C# language.

• Console Applications are commonly used in scenarios where a graphic user interface (GUI) is not necessary, unlike Desktop Applications and toolboxes. Instead, everything can be achieved through text commands. This type of application is used for tasks such as developing software applications, system administration, data connection, security checking, and running programming scripts etc.

* Note: If you are a Microsoft Windows user, you may be familiar with CMD (Command Prompt) or Terminal, where you can access and check system data and disk files, among other tasks. This CMD is an example of a Console Application.

• Lesson- 5, About Console Application

~ Now, we will learn about where and how to practice the C# language using a Console application.

9. Where to practice C# language and how to open a Console Application to start practicing?

• If you want to practice online from any device (e.g., PC, laptop, mobile), you can use the following link: https://onecompiler.com/csharp

• If you want to develop an application, you need a code editor.

• To open a Console application in a code editor, first, download the required files from their respective websites, then install a code editor on your PC or laptop. You can choose either Visual Studio Code or MS Visual Studio, depending on your preference. For a Console Application, now we will focus on Visual Studio Code.

• Visual Studio Code is an open-source and free code editor, so you don't need to pay to use it. You can download it from the following link: https://code.visualstudio.com/Download

* Note: If you choose to use this code editor, make sure to download the file and keep it on your PC or laptop's drive. In shaa Allaah, the next day, we will learn how to install this file and be ready to open a Console Application to start practicing the C# language.

• Lesson- 6, About Online Compiler & VS Code

~ Now, we will learn how to install Visual Studio Code and open a Console Application on it.

10. How to install Visual Studio Code and open a Console Application on it?

~ If you have already downloaded it, then:

1) Open the downloaded file.

2) Accept the Terms & Conditions.

3) Click on the Install button.

4) Wait for the installation to complete.

5) Click on the Launch button to start it.

~ To get started, go to the Explorer view and select Create .NET Project. Alternatively, you can bring up the Command Palette using Ctrl+Shift+P and then type ".NET" and find and select the .NET: New Project command.

• After selecting the command, you'll need to choose the project template. Choose the Console app.

* Note: you also need to install some necessary tools :

• C# Dev Kit extension

• For .NET Development, the .NET SDK

• For more details, follow the link below:

https://code.visualstudio.com/docs/csharp/get-started

• Lesson- 7, Installation VS Code & Open a Console