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(); } } }

← Previous Next →

Discussion & Comments

No comments yet. Be the first to comment!