I was asked a question in an interview about interfaces. I'm not sure if this is really possible. See Question below.
There are 3 interfaces A, Band C. Ainherits from interfaces Band C:
public interface A : B,C
{
}
We need to make sure that the users of these interfaces can not be used B, and Ceither directly or independently and must use only A.
I could think of the following scenarios:
- Make internal interfaces
Band C. But I do not see any real use, since I could directly identify all the members in A. - Do
Band Cprivate interfaces. But how can I do this? In addition, I saw on the following MSDN link that Bthey Cshould be at least as accessible as A: http://msdn.microsoft.com/en-us/library/aa664578%28v=VS.71%29.aspx .
Is there a way to do this, or is the question itself wrong?
source
share