public byte[] ReadBinaryFile(string assembly, string resourceName)
{
using (Stream stream = getStream(assembly, resourceName))
{
using (BinaryReader reader = new BinaryReader(stream))
{
byte[] contents = reader.ReadBytes((int)stream.Length);
return contents;
}
}
}