Complete archive

Weblog / 2003

public, protected, private

We just had a short discussion here at the office on the goodness and badness of using Reflection to cheat around private and protected and cases where it does and doesn't work (it's of course a System.Security.Permissions.ReflectionPermission thing). The discussion brought back memories of that...

Published

RecorddasBlog #ca3668cd-acf8-4bbb-81ff-b26bfde327d4

ReadingUnder 1 minute

We just had a short discussion here at the office on the goodness and badness of using Reflection to cheat around private and protected and cases where it does and doesn't work (it's of course a System.Security.Permissions.ReflectionPermission thing). The discussion brought back memories of that old C/C++ hack that I've been using for almost any application back in my Borland C++ and OWL days:

#define private public
#define protected public
#include <owl.h>