Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. Method hiding!!

Method hiding!!

Scheduled Pinned Locked Moved Visual Basic
csharpjsonquestion
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    myousufq
    wrote on last edited by
    #1

    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

    C 1 Reply Last reply
    0
    • M myousufq

      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

      C Offline
      C Offline
      Christian Graus
      wrote on last edited by
      #2

      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++

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups