I'm currently writing a custom importer for my small XNA project and am trying to do something as simple as throwing a FileFormatException
in my importer Import
method.
I have referenced WindowsBase.dll
, so FileFormatException
should be available under System.IO
in IntelliSense, right? I type System.IO
and there is no autocomplete with FileFormatException
under System.IO
.
Here is where the throw statement is located:
namespace TetrominoImporter
{
public class TetrominoReader : ContentImporter<Tetromino>
{
public const string blockFileName = "blocks.txt";
public override Tetromino Import(string filename, ContentImporterContext context)
{
// HERE
You need to include WindowsBase in your references, as FileFormatException is defined within that assembly. Once you've added that, you should be able to resolve System.IO.FileFormatException
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With