Home » C# Programming » Inheritance

What will be the size of the object created by the following C#.NET code snippet? namespace CuriousTabConsoleApplication { class Baseclass { private int i; protected int j; public int k; } class Derived: Baseclass { private int x; protected int y; public int z; } class MyProgram { static void Main (string[ ] args) { Derived d = new Derived(); } } }

Correct Answer: 24 bytes

← Previous Question Next Question→

More Questions from Inheritance

Discussion & Comments

No comments yet. Be the first to comment!
Join Discussion