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. Accessing internal class in different assebly

Accessing internal class in different assebly

Scheduled Pinned Locked Moved C#
csharpdotnetquestion
4 Posts 3 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
    Mirko1980
    wrote on last edited by
    #1

    Exploring some MS assembly using reflector I found something odd: a class declared internal in one assembly that was being used in a different one. That does not make sense to me. As far as you know, there is some (legal) way to achieve that, or Microsoft is using some C# and/or IL "magic" to make that possible?

    G 1 Reply Last reply
    0
    • M Mirko1980

      Exploring some MS assembly using reflector I found something odd: a class declared internal in one assembly that was being used in a different one. That does not make sense to me. As far as you know, there is some (legal) way to achieve that, or Microsoft is using some C# and/or IL "magic" to make that possible?

      G Offline
      G Offline
      Giorgi Dalakishvili
      wrote on last edited by
      #2

      By looking at the attributes of the assembly you should have found this: InternalsVisibleToAttribute[^]

      Giorgi Dalakishvili #region signature My Articles Asynchronous Registry Notification Using Strongly-typed WMI Classes in .NET [^] My blog #endregion

      M H 2 Replies Last reply
      0
      • G Giorgi Dalakishvili

        By looking at the attributes of the assembly you should have found this: InternalsVisibleToAttribute[^]

        Giorgi Dalakishvili #region signature My Articles Asynchronous Registry Notification Using Strongly-typed WMI Classes in .NET [^] My blog #endregion

        M Offline
        M Offline
        Mirko1980
        wrote on last edited by
        #3

        Wow, I'd never tought that something like that existed! Tank you :)

        1 Reply Last reply
        0
        • G Giorgi Dalakishvili

          By looking at the attributes of the assembly you should have found this: InternalsVisibleToAttribute[^]

          Giorgi Dalakishvili #region signature My Articles Asynchronous Registry Notification Using Strongly-typed WMI Classes in .NET [^] My blog #endregion

          H Offline
          H Offline
          Henry Minute
          wrote on last edited by
          #4

          Yeah! Like he said. Yet another .NET feature I've not encountered before, good to know.

          Henry Minute Do not read medical books! You could die of a misprint. - Mark Twain Girl: (staring) "Why do you need an icy cucumber?" “I want to report a fraud. The government is lying to us all.”

          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