Mirror

How to copy data from a TMemoryStream to a string without using an array of char as buffer (Views: 709)


Problem/Question/Abstract:

How to copy data from a TMemoryStream to a string without using an array of char as buffer

Answer:

var
  S: string;
begin
  SetLength(S, MemStream.Size);
  MemStream.Read(S[1], MemStream.Size);
end;

<< Back to main page