4

I am using binary readers and writers to read / write data to a file. For example for this:

MyWriter.Write(Ord(TMyEnum(2)));

I would expect it to write down SmallInt to be read with

MyReader.ReadSmallInt

But in IDE I see it writes down byte. How do I force the writer to write the type that I want?

4

1 回答 1

4

投射到Smallint

Smallint(SomeEnum)
于 2014-04-21T16:07:49.633 回答