www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - Eliminate all Protection Attributes

reply "Manfred_Nowak" <svv1999 hotmail.com> writes:


http://www.codeproject.com/Articles/42929/Csharp-4-0-Exposer-an-evil-
DynamicObject.aspx

describes code to disable all restrictions of visibility.

Is such possible in D too?

-manfred 
Oct 14 2009
next sibling parent Jeremie Pelletier <jeremiep gmail.com> writes:
Manfred_Nowak wrote:

 
 http://www.codeproject.com/Articles/42929/Csharp-4-0-Exposer-an-evil-
 DynamicObject.aspx
 
 describes code to disable all restrictions of visibility.
 
 Is such possible in D too?
 
 -manfred 
I don't think so, its really not a good thing to do anyways.
Oct 14 2009
prev sibling parent Jacob Carlborg <doob me.com> writes:
On 10/14/09 16:52, Manfred_Nowak wrote:


 http://www.codeproject.com/Articles/42929/Csharp-4-0-Exposer-an-evil-
 DynamicObject.aspx

 describes code to disable all restrictions of visibility.

 Is such possible in D too?

 -manfred
You can use object.tupleof[i] to access and change the fields of a class/struct. For the methods I think you can use pointers/delegates.
Oct 14 2009