partial class
Adam D. Ruppe
destructionator at gmail.com
Fri Oct 31 11:45:39 PDT 2008
On Fri, Oct 31, 2008 at 09:39:42PM +0300, Denis Koroskin wrote:
> Note that partial classes also compromise code security:
>
> partial class Foo
> {
> private int secret;
> }
>
> // HA-HA-HACK!
> partial class Foo
> {
> int hack() { return secret; }
> }
>
> I wouldn't trust these.
That's not really a security problem. It makes getting at
the secret easier, but you could do it without partial
classes (at least in D since you have pointers; I'm
not sure about C#).
--
Adam D. Ruppe
http://arsdnet.net
More information about the Digitalmars-d
mailing list