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. Getting reflection permissions with ReflectionPermissionAttribute

Getting reflection permissions with ReflectionPermissionAttribute

Scheduled Pinned Locked Moved C#
helptutorialquestion
1 Posts 1 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.
  • L Offline
    L Offline
    Luke Murray
    wrote on last edited by
    #1

    Hey all. I am having a bit of trouble with ReflectionPermissions. I have some code that uses reflection to access properties of classes in a different assembly (also mine). The issue is it only gets the private fields from the top-most object, it does not see the private fields from any of the base objects. I have been trying different things with ReflectionPermissionAttributes with no luck. I think I don't understand how to use it correctly. Anyone got any ideas? Do I have to have the calling code set something or the objects with the private fields? Or the assembly in which they live? On the calling class I have tried things like [ReflectionPermission(SecurityAction.Assert, Flags = ReflectionPermissionFlag.AllFlags, MemberAccess = true, Unrestricted = true)] with no luck. Any help on this would be great. Thank you in advance. Luke

    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