using System;
public class A{
public int x;
protected int y;
private int z;
}
public class B : A{
private int d;
protected int e;
//public int x; Wont work because B inherit an variable called X from class A
//public int y; Wont work because B inherit an variable called y from class A
public int z; // this will work because b dont inherit private variables from A
private void foo(){
d = 2;
e = 2;
//x = 2; i can change this - but im just showing that i have already changed it from main class.
y = 2;
// z = 2; will not work
public class Program
{
public static void Main()
B b = new B();
b.x = 1;
/*
in class Main i will be able to manipulate and change the values of b.x, because its a public int that b inherits from A.
In class B - function Foo im able to change the values of d,e,x and y. Not z cus the z is an private int from class A. B can not manipulate the private variables from its parent.
protected vaiables can still be manipulated in inheritance.
*/