unit Unit1;interfaceuses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls;type
  TForm1 = class(TForm)
    Button1: TButton;
    Label1: TLabel;
    procedure Button1Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;  TTest=class
  public
    a:integer;
    b:string;    constructor Create();
  end;var
  Form1: TForm1;implementation{$R *.dfm}
constructor TTest.Create();
begin
  inherited Create();
  a:=1;
  b:='1';
end;
procedure TForm1.Button1Click(Sender: TObject);
var
  test1:TTest;
begin
  test1.Create();
  label1.Caption:=test1.b;
end;end.