public static int GetFileSize(string fileName) { using (Stream stream = File.OpenRead(fileName)) return (int)stream.Length; } }