R
Rustam Asgarov
how can i access variables defined in the parent class from the child class:
By some way other than passing as parameter to constructor.
I mean.
class Parent{
public int b;
public Method()
{
b = 5;
Child child = new Child();
}
}
class Child{
public Method()
{
int a = b; // to do this..
}
}
By some way other than passing as parameter to constructor.
I mean.
class Parent{
public int b;
public Method()
{
b = 5;
Child child = new Child();
}
}
class Child{
public Method()
{
int a = b; // to do this..
}
}