Hi, I would like to know how to port this code in Delphi

a : Word;
  b : ^Word;
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
  b := @a;
  //Display a

To code in .NET, The problem is converting the pointer.

The Migrating Pointer Types section in the Codegear help gives this example however it does not explain it very well on how to use it.

  P: Pointer;
  I: Integer;
  I := 5;
  P := @I;

could be converted to

  P: TObject;
  I: Integer;
  I := 5;
  P := TObject(I);

Other than your initial question seems an overly weird thing to do.. I cant think of why you would ever find yourself in a position to do what that code does.. but .. we'll ignore that..

Everything in .net is an object, so by turning it to a generic "tobject" you have your effective pointer. Does that explain it better?

I would just like to know how to create and use a "pointer" in Delphi.NET. If you can give me an example that would be great

.net doesnt really have pointers.. You dont need them