using System;
public class Program
{
// null guard
public static void PrintUpper(string? text)
if (text is null)
return;
Console.WriteLine(text.ToUpper());
}
public static void Main()
Console.WriteLine("Hello World");
//?? null
string? text = null;
string name = text ?? "Tom"; // կվերագրի Tom, որովհետև text-ը null է
Console.WriteLine(name); // Tom
int? id = 200;
int personid = id ?? 1; // 200,որովհետև id -ը null չէ
Console.WriteLine(personid); // 200