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. Reflection

Reflection

Scheduled Pinned Locked Moved C#
toolsquestion
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.
  • B Offline
    B Offline
    Braulio Dez
    wrote on last edited by
    #1

    Hi, I have read about reflections, seems to be a cool thing... but It's seems more oriented to do case tools than other things ? Am I Wrong ? Some people says me that it's used on huge projects... but I think all that thing of calling "Invoke" and things like that remembers me to the IDispatch nightmare and GUIDS and ... :-(

    H 1 Reply Last reply
    0
    • B Braulio Dez

      Hi, I have read about reflections, seems to be a cool thing... but It's seems more oriented to do case tools than other things ? Am I Wrong ? Some people says me that it's used on huge projects... but I think all that thing of calling "Invoke" and things like that remembers me to the IDispatch nightmare and GUIDS and ... :-(

      H Offline
      H Offline
      Heath Stewart
      wrote on last edited by
      #2

      Reflection is definitely useful for case tools, but it can be used in production code, although the size of the project doesn't matter. For instance, reflection is used by the runtime and XML serialization routines. Reflection could also be used - while not recommended - to get/set a private field in a class if you really need to (its name could be changed at any time, though, which is one reason it's not recommended). You could use reflection to discover type information at runtime, which makes it a good solution in many things like IDispatch interfaces, although reflection is much easier to use, IMO, than dispatch (just less things you have to do to accomplish the same thing, which is pretty universal comparing .NET to lower-level languages like C and C++).

      Microsoft MVP, Visual C# My Articles

      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