c# - Finding file size to decide on size cutoff for loading? -
i writing 32 bit app , 4gb, files process can huge upto 3.5 gb, size should consider before loading file processing?
i mean, c# .net suppose have limited ram framework, should cutoff file (though depends on how memory application takes, arrive @ ballpark figure) ? ( dont have file of magnitude, want handle before memory error)
i suppose, need actual file size
file size on disk
? , possible find without opening file?
you can use fileinfo.length property.
but instead consider using stream classes (see *reader classes in system.io), allow read parts of file, analyse , discard. in way don't care size of file @ all.
Comments
Post a Comment