如题
解决方案 »
- 求3个linq语句的写法
- C#的视频教程谁的比较好
- 关于listbox显示日志
- 将richtextbox控件内容设置成只读的方法或源码
- oracle存储过程怎么建立呀
- 命名空间
- 请各位大侠给在下实例讲解:在.aspx中使用了dataset取得数据库表中信息后,如何交给ajax来取得各行各列中的数据,并回写页面
- 用Graphic Class画string,string倒过来了,怎么会这样??
- 在用委托事件时出现未将对象引用设置到对象的实例
- Visual Studio .NET中如何打包?
- 如何检验字符串是以“\\.\”开头的?
- 关于Random().NextBytes()在内存的编码(分不够可再加)
{
string result;
// Get assembly resource stream
Assembly executingAssembly = Assembly.GetExecutingAssembly(); // Convert stream to string, actually it's XML string.
Stream resourceStream = null;
StreamReader reader = null;
try
{
resourceStream = executingAssembly.GetManifestResourceStream("这里是你project的默认命名空间." + resourceName);
reader = new StreamReader(resourceStream);
result = reader.ReadToEnd();
}
catch (Exception e)
{
throw new Exception(e.Message);
}
finally
{
// Close opened stream
reader.Close();
resourceStream.Close();
} //Return the content of the file in a string.
return result;
}