.Net > Random > Intermediate Next/Skip this question

What would be the output of the following program using nullables?

using System;

struct MyStruct
{
    public string Name;
    public int Age;
}
class Program
{

    static void Main()
    {

        Nullable<MyStruct> myStruct = new Nullable<MyStruct>();
        if (myStruct == null)
        {
            Console.WriteLine("Null");
        }
        else
        {
            Console.WriteLine("Not-Null");
        }
        Console.ReadLine();
    }
}

Answers :
Explaination :
social share share on facebook share on twitter share on google plus share on linkedin
Add Comments :

Login

Register

Next Question