CSharp - Will the code compile: structure syntax?

Question

Will the code compile?

struct MyStructure3
{
    MyStructure3()
    { }
}


Click to view the answer

No. We cannot use the explicit parameterless constructor here.

Can a structure contain properties?

struct MyStructure3
{
    private int myInt;
    public int MyInt
    {
        get
        {
            return myInt;
        }
        set
        {
            myInt = value;
        }
    }
}


Click to view the answer

Yes.

Can we create a structure like this?

struct S
{
    protected int i;
}


Click to view the answer

No. structs can implement an interface but they cannot inherit from another struct. 
For that reason, struct members cannot be declared as protected.

Will the code compile?

using System;

struct OuterStruct
{
    public void Show()
    {
        Console.WriteLine("I am in OuterStruct");
    }
    // internal struct InnerStruct
    protected struct InnerStruct
    {
        public void Show()
        {
            Console.WriteLine("I am in InnerStruct");
        }
    }
}


Click to view the answer

No. protected or protected internal is not allowed here.