C# Tutorial For Beginners 2024 - 14. 'Null Reference Exception/Error'

preview_player
Показать описание
C# Tutorial For Beginners 2024 - 14. "Null Reference Exception/Error"

Рекомендации по теме
Комментарии
Автор

int? value = null;
string? value2 = null;

Console.WriteLine(value is null);
Console.WriteLine(value2 is null);

Console.WriteLine(value2 ?? "default");
Console.WriteLine(value ?? 0);

Console.WriteLine(value is not null ? "true" : "false");
Console.WriteLine(value2 is not null ? "true" : "false");

kvelez