To run a C# code now we don't need namespace, main etc. Just run it
using System;
Console.WriteLine("Hello one line C# 9.0");
//namespace CSharp9
//{
// class Program
// {
// static void Main(string[] args)
// {
// Console.WriteLine("Hello one line C# 9.0");
// }
// }
//}
Even this works
using System;
Console.WriteLine("Hello one line C# 9.0");
Console.WriteLine("Hello one line C# 9.0");
if (1 == 1)
{
Console.WriteLine("if con");
}
Top comments (0)