Forum Xamarin.iOS
We are excited to announce that the Xamarin Forums are moving to the new Microsoft Q&A experience. Q&A is the home for technical questions and answers at across all products at Microsoft now including Xamarin!

We encourage you to head over to Microsoft Q&A for .NET for posting new questions and get involved today.

Opening File

jimistephenjimistephen Member ✭✭

Alright I'm stumped, I know how to do this is Swift but I can't get it working in xamarin. I'm trying to open a .txt file and read it. Should be simple. I keep getting this error though.

    Could not find a part of the path "/Users/stephenvickers/Library/Developer/CoreSimulator/Devices/1FC3F851-5D1F-41F5-AD85-    

I'm trying to open it like this:

    var text = File.ReadAllText(file);

The file I'm trying to read is in the project under a TextFiles Folder. I downloaded the sample project and looked at it from the Github project and that runs fine.

Can anyone help?

Sign In or Register to comment.