- Assembly assm = Assembly.GetAssembly(typeof(DatabaseCleanup));
- string file = "DatabaseCleanup.txt";
- Stream input = assm.GetManifestResourceStream("DataLoader.Resource" + "." + file);
- StreamReader reader=new StreamReader(input);
- string sql=reader.ReadToEnd();
- reader.Close();
- //该片段来自于http://www.codesnippet.cn/detail/100120131495.html
来源: http://www.codesnippet.cn/detail/100120131495.html