learn

if

var result = condition ? valueIfTrue : valueIfFalse;

While Loop

while (condition) 
{
    // code to execute
}

Variable

var myVariable = value;

Function

public void Myfunc() 
{
    // code to execute
}

Class

public class MyClass 
{
    // properties and methods
}

Import / Using Directive

using System;

Export is not a C# keyword, but you can use the ‘public’ access modifier to make a type or member visible outside the assembly.

Input

Console.Write("Enter your name: ");
string name = Console.ReadLine();

Output

Console.WriteLine("Hello, " + name + "!");

template string

$"{Var}"