Question: What would result when the following code is compiled?: public class A private int value = 10; public class B : A { public int

What would result when the following code is compiled?: public class A private int value = 10; public class B : A { public int GetValue) { return this.value; } } public class CA public int GetValue() { return this.value; } - } A) No errors would result, and both class cand class B would inherit from class A. B) No errors would result, and only class B would be able to use the GetValue method. C) An error would occur because class B is nested inside of class A and tries using A.Value. D) An error would occur because class cis not nested inside of class A and tries using A.Value
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
