Today I faced a very odd interview question. The interviewer asked me:-
There is a class Parent and it has a method GetData
. Class Child1 inherits Parent and Child2 inherits Child1. What you can do in Parent class so that the method "GetData" will be accessible from Child1 but not from Child2?