public static byte[] GetResource(string fullname)
{
Assembly asm = Assembly.GetExecutingAssembly();
using (Stream s = asm.GetManifestResourceStream(fullname))
{
using (StreamReader r = new StreamReader(s))
{
return System.Text.Encoding.ASCII.GetBytes(r.ReadToEnd());
}
}
}