Microsoft.Xna.Framework.TitleContainer.OpenStream()
/// <summary>
/// This method opens a file using System.IO classes and the
/// TitleLocation property. It presumes that a file named
/// ship.dds has been deployed alongside the game.
/// </summary>
private static void DoOpenFile()
{
try
{
System.IO.Stream stream = TitleContainer.OpenStream("aa.txt");
System.IO.StreamReader sreader = new System.IO.StreamReader(stream);
// use StreamReader.ReadLine or other methods to read the file data
Console.WriteLine("File Size: " + stream.Length);
stream.Close();
}
catch (System.IO.FileNotFoundException)
{
// this will be thrown by OpenStream if gamedata.txt
// doesn't exist in the title storage location
}
}
Microsoft.Xna.Framework.TitleContainer.OpenStream()的更多相关文章
- [已解决]:调用 LoadLibraryEx 失败,在 ISAPI 筛选器 "c:\Windows\Microsoft.NET\Framework\v4.0.30319\\aspnet_filter.
现象:我的是 win7, iis7, 64bit, 打开网站错误如下: 错误摘要 HTTP 错误 500.0 - Internal Server Error 调用 LoadLibraryEx 失败,在 ...
- Microsoft .NET Framework 4.0.3版下载
适用于 Microsoft .NET Framework 4 的更新 4.0.3,其中包含一系列新增功能,用于满足高端客户的功能需求和重要 .NET Framework 方案的需求. http://w ...
- You must use the Role Management Tool to install or configure Microsoft .NET Framework 3.5 SP1
今天在Windows Server 2008 下安装SQL SERVER 2008时,碰到如下错误: You must use the Role Management Tool to install ...
- Microsoft .NET Framework 4.6.1
适用于操作系统平台:Windows 7 SP1.Windows 8.Windows 8.1.Windows 10.Windows Server 2008 R2 SP1.Windows Server 2 ...
- CS0016: 未能写入输出文件“c:\WINDOWS\Microsoft.NET\Framework\.。。”--“拒绝访问
aspx 常见错误 CS0016: 未能写入输出文件“c:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/Temporary ASP.NET Files/... ...
- Microsoft Win32 to Microsoft .NET Framework API Map
Microsoft Win32 to Microsoft .NET Framework API Map .NET Development (General) Technical Articles ...
- 转发 win7+iis7.5+asp.net下 CS0016: 未能写入输出文件“c:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files 解决方案
win7+iis7.5+asp.net下 CS0016: 未能写入输出文件“c:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NE ...
- 必须使用“角色管理工具”安装或配置Microsoft .NET Framework 3.5 SP1
在Windows Server 2008下直接安装SQL Server 2008时,会出现如下错误: 必须使用“角色管理工具”安装或配置Microsoft .NET Framework 3.5 SP1 ...
- cs0006 未能找到元数据文件 C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files
翻阅了一些资料后发现是需要重新注册IIS服务扩展,在“开始”-“运行”里输入如入命令,回车,搞定 C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspne ...
随机推荐
- LINUX 数据结构 &算法 网络协议 & 网络编程 多任务编程
http://blog.csdn.net/goodluckwhh/article/category/1303091
- Socket 之 原理与编程基础
一.Socket简介 Socket是进程通讯的一种方式,即调用这个网络库的一些API函数实现分布在不同主机的相关进程之间的数据交换. 几个定义: (1)IP地址:即依照TCP/IP协议分配给本地主机的 ...
- c#基础--常量(const),只读字段(readonly)
1.0:常量 常量被关键字const 所修饰 我们来看看常量的demo class Program { static void Main(string[] args) { const string n ...
- A Simple Problem with Integers 多树状数组分割,区间修改,单点求职。 hdu 4267
A Simple Problem with Integers Time Limit: 5000/1500 MS (Java/Others) Memory Limit: 32768/32768 K ...
- 企业级搜索引擎Solr 第三章 索引数据(Indexing Data)[2]--DIH
转载:http://quweiprotoss.wap.blog.163.com/w2/ DIH需要在solrconfig.xml中注册,如下: <requestHandler name=&quo ...
- 一个Java线程死锁的例子
package com.lk.B; public class Test4 { private static final Object o1 = new Object(); private static ...
- iOS - UI - UITableView
1.UITableView 表格视图 服从数据源 - (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSIn ...
- 懒人福利:Xcode插件将JSON格式化输出为模型的属性->ESJsonFormat-Xcode
这是一个直接将json数据转换为模型数据的插件,只需要在控制台输入json数据,就可以在模型文件的.h文件中生成对应的模型数据 对于模型套模型的数据也做了处理,比较方便. 有需要的人可以尝试一下,但不 ...
- [转]在WPF中使用WinForm控件方法
本文转自:http://blog.csdn.net/lianchangshuai/article/details/6415241 下面以在Wpf中添加ZedGraph(用于创建任意数据的二维线型.条型 ...
- Macbook之设置Finder显示文件完整路径
终端里输入:defaults write com.apple.finder _FXShowPosixPathInTitle -bool TRUE;killall Finder 回复输入:default ...