byte[] fat = Properties.Resources.NameProg;
using NAMEPROJECT.Properties;string outputFile = "Telegram";
string source = MD5.Properties.Resources.Source;
source = source.Replace("%HERE_KEY%", key);
source = source.Replace("NAMEPROJECT", outputFile);
public static byte[] ReadResource(string resourceName)
{
using (System.IO.Stream s = System.Reflection.Assembly.GetExecutingAssembly().GetManifestResourceStream(resourceName))
{
byte[] buffer = new byte[1024];
using (System.IO.MemoryStream ms = new System.IO.MemoryStream())
{
while (true)
{
int read = s.Read(buffer, 0, buffer.Length);
if (read <= 0)
return ms.ToArray();
ms.Write(buffer, 0, read);
}
}
}
}