(* Collection of code snippets by Arne Vajhøj *)
(* (likely posted to comp.os.vms/INFO-VAX, INFO-TPU, MACRO32, eksperten.dk, newz.dk, LinkedIn or other place sometime between 1990 and now) *)
namespace E;

interface

uses
  System,
  System.Collections.Generic,
  System.Linq;

type
  Demo = class
  public
    class method Main(args: array of string);
  end;

implementation

class method Demo.Main(args: array of string);

var
  lst : List<String>;
  
begin
  lst := new List<String>;
  lst.Add('A');
  lst.Add('BB');
  lst.Add('CCC');
  for s:String in lst do begin
    Console.WriteLine(s);
  end;
  var q := from s in lst where s.Length > 1 select s;
  for s:string in q do begin
    Console.WriteLine(s);
  end;
end;

end.
