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. Hiding Members

Hiding Members

Scheduled Pinned Locked Moved Visual Basic
performancehelpquestionlearning
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.
  • T Offline
    T Offline
    THEMYTH
    wrote on last edited by
    #1

    Hello I create a structure (shown below) Public Structure strucAI Public IO As strucIO Public Data As strucData Public System As strucSystems Public Memory As strucMemory Public Learning As strucLearning Public Operations As strucOperations Public Programming As strucProgramming End Structure And I define a variable AI as the structure Public AI As strucAI But the problem is : i want to hide members which are; AI.GetType() AI.Equals() AI.GetHashCode() AI.ToString() Is there any way to do that? Thank you for your time Regards Best Regards Emre YAZICI

    A 1 Reply Last reply
    0
    • T THEMYTH

      Hello I create a structure (shown below) Public Structure strucAI Public IO As strucIO Public Data As strucData Public System As strucSystems Public Memory As strucMemory Public Learning As strucLearning Public Operations As strucOperations Public Programming As strucProgramming End Structure And I define a variable AI as the structure Public AI As strucAI But the problem is : i want to hide members which are; AI.GetType() AI.Equals() AI.GetHashCode() AI.ToString() Is there any way to do that? Thank you for your time Regards Best Regards Emre YAZICI

      A Offline
      A Offline
      apferreira
      wrote on last edited by
      #2

      Since all data types in NET derive ultimatelly from the Object data type and the GetType(), Equals(), GetHashCode(), ToString() are members of Object, these methods can not be hidden:(, they can only be overriden. In your case, it would be interesting to override the ToString() method to display a custom text representation of your struct.

      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