8
我目前正在为我的小型XNA项目编写一个自定义导入程序,并试图做一些简单的操作,如在我的导入程序Import
方法中抛出FileFormatException
。无法使用FileFormatException(?)
我已经引用了WindowsBase.dll
,所以FileFormatException
应该在智能感知的System.IO
下可用,对吧?我输入System.IO
,并且在System.IO
下没有自动完成FileFormatException
。
这里就是throw语句所在位置:
namespace TetrominoImporter
{
public class TetrominoReader : ContentImporter<Tetromino>
{
public const string blockFileName = "blocks.txt";
public override Tetromino Import(string filename, ContentImporterContext context)
{
// HERE
好吧,我是一个完全白痴,谢谢你instream,我刚刚注意到我的OTHER(importer)项目没有引用WindowsBase,我的主要项目做了(这是没用的)。并且该代码位于导入器中。对不起,我觉得很蠢。这就像我看不到那个错误,因为它只是在我面前。 您能否将您的帖子设置为答案,S Grimminck,以便我接受它? (我认为它是如何工作的?)谢谢 – Toto 2013-03-20 20:46:03