티스토리 뷰
type
TDatabase = class (TCollectionItem)
private
FDatabaseName: String;
published
property DatabaseName: String read FDatabaseName write FDatabaseName;
end;
TDatabaseList = class (TCollection)
private
function GetItem(Index: Integer): TDatabase;
public
function Add: TDatabase;
property Item[Index: Integer]: TDatabase read GetItem;
end;
{ TDatabaseList }
function TDatabaseList.Add: TDatabase;
begin
result := inherited Add as TDatabase;
end;
function TDatabaseList.GetItem(Index: Integer): TDatabase;
begin
result := inherited Items[Index] as TDatabase;
end;
{ TForm1 }
procedure TForm1.Button1Click(Sender: TObject);
var
DatabaseList : TDatabaseList;
aDatabase : TDatabase;
i : Integer;
begin
DatabaseList := TDatabaseList.Create(TDatabase);
aDatabase := DatabaseList.Add; // create one hair
aDatabase.DatabaseName := 'Oracle';
aDatabase := DatabaseList.Add; // create another hair
aDatabase.DatabaseName := 'MsSQL';
for i :=0 to DatabaseList.Count-1 do begin
Memo1.Lines.Add(DatabaseList.Item[i].DatabaseName);
end
end;
- Total
- Today
- Yesterday
- JavaScript
- 튜닝쇼 2008
- NDK
- sas2009
- android
- KOBA
- 지스타2007
- 서울오토살롱
- BPI-M4
- Mac
- 동경
- 전예희
- ffmpeg
- 일본여행
- 송주경
- MySQL
- Spring MVC
- Java
- Spring
- Delphi
- Xcode
- flex
- koba2010
- SAS
- Linux
- ubuntu
- oracle
- 레이싱모델 익스트림 포토 페스티벌
- Delphi Tip
- ble
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | |||
5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 | 27 | 28 | 29 | 30 | 31 |