[英]how to find the number of bytes in a file?
我在C#中申請。 在這里,我想找出特定文件中的字節數。 我在這里使用代碼
using(FileStream fs=new FileStream(filename,FileMode.Open,FileAccess.Read))
{
//Here i want to find the number of Bytes.
//Some more code.
}
請幫幫我。謝謝。
使用FileStream.Length
屬性。
獲取流的長度(以字節為單位)。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.