if () { } // Условный оператор
else () { } / else if () { } // Иное значение

if (c < 0) ;
{
Console.WriteLine(«C menshe nula»);

for (int i = 0; i < 10; i++) // Обычный цикл
while (true) / while () // Цикл
Foreach

foreach (string line in lines) // Цикл по массиву (lines — массив

var array1 = [‘a’, ‘b’, ‘c’];
array1.forEach(function(element) {
console.log(element);
});
for

for (int i = 0; ; ) {
    long i = 1;   // valid C, invalid C++
    // ...

whole(true)
Switch // Оператор выбора

 

Convert()

a = Convert.ToSingle(Console.ReadLine());
Console.WriteLine(«Vvedite chislo b:»);
b = Convert.ToSingle(Console.ReadLine());

Convert.ToInt16 //Конвертация параметра в другой тип данных

print («Hello World!») -> Console.WriteLine(«Hello World!»)

string text = Convert.ToStr(Console.ReadLine()) // Считывание строки

string text = file.ReadLine() // Считывание файла

Console.Write("text"); // Вывести текст
Console.WriteLine("text"); // Вывести текст с переносом на след. строку
Console.ReadLine(); // Считать строк