Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

The maximum size for file that can be read in .net

Tags:

c#

.net

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 ?

like image 640
Zied Avatar asked Jan 16 '10 22:01

Zied


1 Answers

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. )

like image 69
kervin Avatar answered Sep 28 '22 18:09

kervin