I assume external is null. Perhaps there is an issue with GetExternalFilesDir?
Miha -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Paul Johnson Sent: Wednesday, March 28, 2012 12:21 AM To: Discussions related to Mono for Android Subject: [mono-android] Any ideas why this fails? Hi, I'm trying to write to the SDCard with the following code (which was suggested on here), but I'm getting a null reference error on the Path.Combine line - I've no idea why either! var external = GetExternalFilesDir(null); var dir = Path.Combine(external.AbsolutePath, "OQHRA"); if (!File.Exists(dir)) { System.IO.Directory.CreateDirectory(dir); } Any help here would be appreciated. I'm using m4a 4.04 Paul _______________________________________________ Monodroid mailing list [email protected] UNSUBSCRIBE INFORMATION: http://lists.ximian.com/mailman/listinfo/monodroid _______________________________________________ Monodroid mailing list [email protected] UNSUBSCRIBE INFORMATION: http://lists.ximian.com/mailman/listinfo/monodroid
