델피의 클래스 이해(11) - 클래스에 깊이 들어가는 방법[6] - 클래스에 깊이 들어가는 방법 재부팅

1364 단어 Delphi


//                         ,  :

TMyClass = class(TObject)

  function Fun(s: string): string; overload;

  function Fun(i: Integer): Integer; overload; 

  function Fun(x,y: Integer): string; overload;

end;


 
   
// , , overload TBass = class(TObject) function Fun(s: string): string; { overload, } end; TChild = class(TBass) function Fun(i: Integer): Integer; overload; end; { , }
//published , ! { } TMyClass = class(TObject) published function Fun(s: string): string; overload; function Fun(i: Integer): Integer; overload; end;
// : , published , ? { public , published ; , . , : } // TForm1 : type TForm1 = class(TForm) procedure alert(s: string); overload; {No.1} procedure alert(s1,s2: string); overload; {No.2} private { Private declarations } public { Public declarations } end; // , : type TForm1 = class(TForm) procedure alert(s: string); overload; {No.1} private { Private declarations } public { Public declarations } end;

좋은 웹페이지 즐겨찾기