0
votes
Vote UpVote

Static class methods

The Programming Works – Consider the following code: unit Unit2; interface uses Dialogs; type TNamedObj = class private FObjName: string; public constructor Create(const AName: string); procedure ShowName1; class procedure ShowName2(Obj: TNamedObj); static; end; implementation constructor TNamedObj.Create(const AName: string); begin FObjName:= AName; end; procedure TNamedObj.ShowName1; begin ShowMessage(FObjName); end; class procedure TNamedObj.ShowName2(Obj: TNamedObj); begin ShowMessage(Obj.FObjName); end; end. At a first glance ShowName2 looks like a useless addition. It ...
Favorite? Off-Topic? Serg @ 2012-03-24 04:02

Statistics

Visits: 957
Votes: 0
Favorites: 0
Off-Topic: 0

Visits by Source

User Actions

Users who voted for this posting

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)