create c# console application in visual studio code code example
Example 1: how to make a C# application visual studio code
mkdir MyApp; cd MyApp;
dotnet new console
Example 2: simple program in c# for vs code .net console
using System;
namespace C__Learning
{
class Program
{
static void Main(string[] args)
{
Console.ForegroundColor = ConsoleColor.Green;
Console.Title = "C#Learning";
Console.WindowHeight = 40;
Double num01;
Double num02;
Console.Write(" Input a number: ");
num01 = Convert.ToDouble( Console.ReadLine());
Console.Write("Input a second number: ");
num02 = Convert.ToDouble( Console.ReadLine());
Double result = num01 * num02;
Console.WriteLine("The result is " + result);
Console.ReadKey();
}
}
}
Example 3: dotnet core create console project
dotnet new console