String filePath = "test.txt";
System.Reflection.Assembly app = System.Reflection.Assembly.GetExecutingAssembly();
Stream fsOpen = app.GetManifestResourceStream("ResourcesFileRead.fileContent.txt");
FileStream fsSave = new FileStream(filePath, FileMode.Create);
StreamReader sr = new StreamReader(fsOpen);
StreamWriter sw = new StreamWriter(fsSave);
long lenth = sr.BaseStream.Length;
int i = 0;
char[] bytes = new char[256];
while (!sr.EndOfStream)
{
i = sr.Read(bytes, 0, 256);
sw.Write(bytes, 0, i);
}
sw.Flush();
sw.Close();
sr.Close();
fsSave.Close();
fsOpen.Close();