A Variable is declared as "Private" in one class in C#.
Can i access this same variable in other class which is derived by this?
For eg:
public class Teacher
{
private string Name="ABC";
}
Public class Student:Teacher
{
in this class can i access "Name" variable which was declared in Teacher Class?
}
Can i access this same variable in other class which is derived by this?
For eg:
public class Teacher
{
private string Name="ABC";
}
Public class Student:Teacher
{
in this class can i access "Name" variable which was declared in Teacher Class?
}
Comment