PRN212_-_SP_2025_-_Block_5_-_2_3887.webp
T

PRN212_-_SP_2025_-_Block_5_-_2_3887.webp

  • Media owner Tsuyu89
  • Ngày thêm
Kizspy | Question: 32
(Choose 1 answer)
Which code demonstrates the use of FileStream for reading a file?
A. using (FileStream fs = new FileStream("example.txt", FileMode.Open))
{
byte[] bytes new byte[fs.Length];
fs.Read(bytes, 0, (int)fs.Length);
}
B. using (FileStream fs = new FileStream("example.txt", FileMode.Create))
{
byte[] bytes = new byte[fs.Length];
fs.Read(bytes, 0, (int)fs.Length);
}
C. using (FileStream fs = new FileStream("example.txt", FileMode.OpenOrCreate))
}
byte[] bytes = new byte[fs.Length];
fs.Write(bytes, 0, (int)fs.Length);
}
D. using (FileStream fs = new FileStream("example.txt", FileMode.CreateNew))
{
byte[] bytes = new byte[fs.Length];
fs.Seek(0, SeekOrigin.Begin);
}

Thông tin

Category
PRN212
Thêm bởi
Tsuyu89
Ngày thêm
Lượt xem
2,708
Lượt bình luận
9
Rating
0.00 star(s) 0 đánh giá

Share this media

Back
Bên trên Bottom