Einzelnen Beitrag anzeigen

Dejan Vu
(Gast)

n/a Beiträge
 
#7

AW: Sinnvollste Abbildung eines mehrdimensionalen assoziativen Arrays in Delphi?

  Alt 29. Mai 2015, 04:45
Type
Delphi-Quellcode:
  TFormStorage = class
  private
    Function GetItem(const formName : String; X,Y : Integer) : String;
    Procedure SetItem(const formName : String; X,Y : Integer; const value : String);
  public
    property Item[formName : String; X,Y : Integer] : String Read GetItem Write SetItem;
  end;

var
  formStorage : TFormStorage;
...
// Zugriff
  formStorage['Foo',12,34] := 'Bar';
  Mit Zitat antworten Zitat