.NET Core SDK
cmd
dotnet —version
dotnet new console —name HelloCharp
using System;using System.IO;namespace HelloCSharp{class Program{static void Main(string[] args){var stream = File.Create(@"C:\Users\Administrator\Desktop\Playgroud\HelloCSharp\Test.txt");var writer = new StreamWriter(stream);writer.WriteLine("Hello C# World");writer.Flush();writer.Close();Console.WriteLine("Done");}}}

Visual Studio Code
using System;using System.IO;namespace HelloCSharp{class Program{static void Main(string[] args){var stream = File.Create(@"C:\Users\Administrator\Desktop\Playgroud\HelloCSharp\Test.txt");var writer = new StreamWriter(stream);writer.WriteLine("HelloC#");writer.Flush();writer.Close();Console.WriteLine("Done");}}}
