What’s the maximum size of file that can be read in .net Framework ?
It’s the long(Int64) max because it’s the type of the offset in the Seek method in all reader ?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I believe the answer is “undefined” by the language specification.
The seek offset is based of an origin, so you can seek a file larger long max. You just can’t seek from the file start. Also, the file object does not have to support seek to be read. There’s more info in the FileStream.Seek Documentation
Maybe someone else knows better, but I don’t believe there’s a maximum file size defined. You’ll be constrained by what you do with the data read from the filesystem ( e.g. running out of memory to store it, etc. )