C # writes a long type to a binary file with bw. Write ((long) num); read it out with a long num= (long) Br. ReadInt64 ();

Source: Internet
Author: User

Reason:

Because the long type is System.Int64 (Long integer, which accounts for 8 bytes, representing 64-bit integers, the range is approximately-(10 of 19) to 10 of the square)

The Long Binaryreader.readint64 () method reads a eight-byte signed integer from the current stream and advances the current position of the stream by 8 bytes.

Eight bytes to eight bytes, so

The way to read a long type of binary file is Binaryreader.readint64 ()

C # writes a long type to a binary file with bw. Write ((long) num); read it out with a long num= (long) Br. ReadInt64 ();

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.