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. C#
  4. private methods using .net reflection. why??

private methods using .net reflection. why??

Scheduled Pinned Locked Moved C#
csharpcomquestion
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
    mittalpa
    wrote on last edited by
    #1

    Hi I used reflection many times before on public methods but never realized that private methods can be invoked too. See the link : link I am still thinking why is that allowed in the first place? Isn't that going to break the rule of "private" being "private"? puzzled AJ

    Follow your goals, Means will follow you ---Gandhi---

    L 1 Reply Last reply
    0
    • M mittalpa

      Hi I used reflection many times before on public methods but never realized that private methods can be invoked too. See the link : link I am still thinking why is that allowed in the first place? Isn't that going to break the rule of "private" being "private"? puzzled AJ

      Follow your goals, Means will follow you ---Gandhi---

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      It's reflection, the very concept of it breaks all rules - much like arbitrary pointer arithmetic and type punning That doesn't matter though, these things are useful in practice, The Rules are mostly of theoretical value (for example to be able to prove things about programs) and are only guidelines in the Real World.

      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