Skip to content

How to use TDoublyLinkedList #35

@jkour

Description

@jkour

Hi,
Can you provide an example about how to use TDoublyLinkedList?

This is what I have so far:

  var list: TDoublyLinkedList:=TDoublyLinkedList.Create;
  list.Append(TDoublyLinkedString.Create('1'));
  var ni:TDoublyLinkedString:=TDoublyLinkedString.Create('2');
  ni.Append('2.1');
  ni.Append('2.2');
  list.Append(ni);
  list.free;

How do I iterate through the elements?
I'd like to produce the following output:
1
2 - 2.1 - 2.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions