Registriert seit: 2. Nov 2003
Ort: Bei Kiel, SH
729 Beiträge
Delphi 2006 Architect
|
Re: Klassenmethoden in Delphi
5. Dez 2003, 10:33
Diese Lösung scheint zu funktionieren
Delphi-Quellcode:
type
TMyClass = class(TObject)
public
class procedure GetValues(out AValue1, AValue2: string;
const AWhen: TDateTime=0; const ACritaria: string='');
end;
class procedure TMyClass.GetValues(out AValue1, AValue2: string;
const AWhen: TDateTime; const ACritaria: string);
begin
AValue1:= '42';
AValue2:= 'I always knew there´s something wrong in the universe...';
end;
procedure TForm1.Button1Click(Sender: TObject);
var
myString1: string;
myString2: string;
myCriteria: string;
begin
myCriteria:= 'What do you get if you multiply six by nine?';
TMyClass.GetValues(myString1, myString2, Now, myCriteria);
Showmessage(myString1+#10#13+myString2);
end;
gruß, choose
|
|
Zitat
|