.Net > Nullable types > Intermediate Next/Skip this question

Can we assign null to a structure object?

for example

using System;
using System.Threading;

struct MyStruct
{
    public string Name;
    public int Age;
}
class Program
{
   
    static void Main()
    {
        MyStruct m = 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