Method hiding!!
-
Hi All! I wrote a abstract class in VB.net and just define 4 methods than I inherit this class to derived class B and also with CLass C. In Class B I Implemented all 4 methods but in Class C I want to use just 2 methods. I know this is possible that just give complete defination of 2 methods that i want to use and leave empty rest of them. When I make an object of Class C and try to access it s methods then it shows all 4 methods, I wana hide it s 2 method, which are not complety define in Class C. any idea??? Thanks
-
Hi All! I wrote a abstract class in VB.net and just define 4 methods than I inherit this class to derived class B and also with CLass C. In Class B I Implemented all 4 methods but in Class C I want to use just 2 methods. I know this is possible that just give complete defination of 2 methods that i want to use and leave empty rest of them. When I make an object of Class C and try to access it s methods then it shows all 4 methods, I wana hide it s 2 method, which are not complety define in Class C. any idea??? Thanks
It sounds like two of the four methods need to either be not abstract, or more likely defined in an interface that only class B uses. You definately cannot hide methods from a base class on a class by class basis, that would be ridiculous. Christian Graus - Microsoft MVP - C++