6
votes
Vote UpVote

Accessing Private Stuff with Interfaces

Nick Hodges – I have to admit that the following code surprised me.  I guess it makes sense, but I wouldn’t have guessed that you can expose private functionality via an interface like this.  Interesting.  program DoPrivateStuff; {$APPTYPE CONSOLE} uses SysUtils; type ITestInterface = interface procedure DoThisPrivateThing; procedure DoThisPublicThing; end; TTestClass = class(TInterfacedObject, ITestInterface) private procedure DoThisPrivateThing; public procedure DoThisPublicThing; end; { TTestClass } procedure TTestClass.DoThisPublicThing; begin ...
Favorite? Off-Topic? nick@nickhodges.com @ 2011-06-27 23:38

Statistics

Visits: 1025
Votes: 6
Favorites: 0
Off-Topic: 0

Visits by Source

User Actions

Users who voted for this posting

Alister Christie
Jordi Coll Corbilla
Jørn E. Angeltveit
ket555
stOrM!
TDelphiHobbyist
Subscribe:
Contact us to advertise on DelphiFeeds.com

Community Links

Torry Firebird News

Sponsor

 
Please login or register to use this functionality.
(click on this box to dismiss)