-2 c#
FileStream fs = File.OpenRead(fullFilePath);
try
{
Console.WriteLine("Read file size is : " + fs.Length);
byte[] bytes = new byte[fs.Length]; //// **error this line**
fs.Read(bytes, 0, Convert.ToInt32(fs.Length));
fs.Close();
return bytes;
}
finally
{
fs.Close();
}
Run Code Online (Sandbox Code Playgroud)
read file size 2,885,760 KB.是错误//
**Arithmetic operation resulted in an overflow.**
| 归档时间: |
|
| 查看次数: |
3390 次 |
| 最近记录: |