C# Programming - Structures - Discussion

Discussion :: Structures - General Questions (Q.No.2)


Creating empty structures is allowed in C#.NET.

[A]. True
[B]. False

Answer: Option B


No answer description available for this question.

Durg said: (Jan 21, 2012)  
struct s {} // is not this empty structure

class c
static void Main()
s s1;

Vishal said: (Apr 9, 2013)  
struct Test
static void Main()


when I create this it execute successfully. Its also a type of empty structure.

Nicholas Mahbouby said: (May 7, 2014)  
Creating an empty structure is allowed in C# and the compiler will not complain. However all structs implicitly inherit members from System.ValueType and thus are never really empty.

Andrew said: (Jul 12, 2015)  
May be empty constructors?

Post your comments here:

Name *:

Email   : (optional)

» Your comments will be displayed only after manual approval.