Answers for "check null type"

C#
0

check null type

int? b = 10;
if (b.HasValue)
{
    Console.WriteLine($"b is {b.Value}");
}
else
{
    Console.WriteLine("b does not have a value");
}
Posted by: Guest on April-07-2022

C# Answers by Framework

Browse Popular Code Answers by Language