4
How could I solve the following problem.
Setting: I have a class B that inherits from class A and implements interface I.
Problem: The I interface requires the implementation of the X method which in turn is implemented in class A, and not in B.
Visual Studio does not recognize this implementation by the father, what I should do?
If B inherits from A, the method is implemented in A, there is no way it does not exist in B. You can give more information, post the code?
– Maniero
Yes, the method is in B but it does not recognize this method in the implementation of the I interface.
– Leonardo
Does the method have the same signature (same parameters, identical declaration)? Post the code of A, B and I.
– Maniero
It was my mistake, the interface was receiving, as parameter, an int? and not an int. Thanks for the help.
– Leonardo
@bfavaretto, because you put it on hold?
– user6026
@Harrypotter Because of the author’s comment just above. He made an error in the interface, which does not appear in the question as it does not include the code.
– bfavaretto
@bfavaretto is under discussion at the goal: http://meta.pt.stackoverflow.com/q/1527/6026
– user6026
Just for the record, one of those open votes is mine, and I clicked wrong when trying to click the inheritance tag. I don’t agree with the opening.
– Bacco