In this c# tutorial, you will learn how to run c# program in visual studio code in windows 10 with clear example.
- VSC Editor supports the c# programming using dotnet core SDK
Requirements
- The following packages should be installed in your machine
- Download .NET Core SDK – Latest Version is 7.0
- Download and install Visual Studio Code (VSC) Editor
- OS: Windows 10
- Code Runner: Optional (Automatic Way to Running C# Code in VSC Editor).
STEPS FOR INSTALLING .NET SDK CORE IN WINDOWS 10
STEP 1
STEP 2
STEP 3
VERIFICATION OF DOTNET CORE SDK IN PC
Open the CMD window and type dotnet –info to get the complete information about dotnet core SDK
STEPS FOR RUNNING C# CODE in VSC EDITOR
- Install dot net core SDK
- Install C# Extension in VSC Editor
- Create a new project in VSC editor.
2. INSTALLING C# EXTENSION IN VSC EDITOR
I. EXAMPLE OF CREATING AND RUNNING C# CODE USING DOTNET CORE SDK IN VISUAL STUDIO CODE (VSC) EDITOR
1. Open VSC editor and Create a new c# project (based on dotnet SDK)
- Type the command like below
- dotnet new console -o <project-name>
- cd <project-name>
- code . // open created project in VSC editor.
2. Create a new project in VSC Editor (Continue)
PROJECT STRUCTURE IN VSC EDITOR
2. SOURCE CODE
Console.WriteLine(“Hello, World!”);
3. Build Project in VSC Editor
Command: dotnet build
4. Run Project in VSC Editor
Command: dotnet run
OUTPUT
More Tutorials
-
How to convert Word to Number in Bash Script
FacebookTweetPinLinkedInEmailShares0SharePrint In this bash tutorial, you will get convert word to number in bash script with examples.This is implemented using for loop, tr command, switch case in shell…
-
How to Count Word Frequency in Bash Script
FacebookTweetPinLinkedInEmailShares0SharePrint In this bash tutorial, you will get the program about how to count word frequency in bash script. This is done by using for loop,…
-
Bash Script – How to convert Number to Words
FacebookTweetPinLinkedInEmailShares0SharePrint In this tutorial, you will see how to convert numbers to words using bash script. This shell script can be done with the help of switch case…