using System;
// -- case 1
public class A
{
private int _a;
protected A(int a){
// init class
_a = a;
}
public void printA(){
Console.WriteLine("_a = {0}", _a);
public class B : A
private int _b;
public B(int a, int b) : base(a){
// do some another init stuff
_b = b;
public void printB(){
Console.WriteLine("_b = {0}", _b);
public class Program {
public void Main(){
var b = new B(10, 20);
b.printA();
b.printB();