[ALL] Stop using "using" for everything except databases

This commit is contained in:
Matt Nadareski
2016-09-22 15:36:02 -07:00
parent 6b43053b7d
commit 74fbe60686
6 changed files with 239 additions and 248 deletions

View File

@@ -610,10 +610,9 @@ namespace SabreTools.Helper
{
// Read the BOM
var bom = new byte[4];
using (var file = new FileStream(filename, FileMode.Open, FileAccess.Read))
{
file.Read(bom, 0, 4);
}
FileStream file = File.OpenRead(filename);
file.Read(bom, 0, 4);
file.Dispose();
// Analyze the BOM
if (bom[0] == 0x2b && bom[1] == 0x2f && bom[2] == 0x76) return Encoding.UTF7;