Quantcast
Channel: Questions in topic: "error"
Viewing all articles
Browse latest Browse all 7934

trying to parse FileNotFoundException causes compile error

$
0
0
Hello, So I am trying to catch a FileNotFoundException and read the file from the exception like this: catch (FileNotFoundException e) { string file = e.FileName; } Visual Studio throws no errors, but in unity at compile time it throws: Type `System.IO.FileNotFoundException' does not contain a definition for `FileName' and no extension method `FileName' of type `System.IO.FileNotFoundException' could be found (are you missing a using directive or an assembly reference?) any idea why it would do this?

Viewing all articles
Browse latest Browse all 7934

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>