Forum Xamarin.Forms
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.

Delete files in WinPhone

jmfernandezjmfernandez USMember ✭✭

Hi all,

I'm taking pictures with the camera, and then I have to delete the picture taken, and for that I am deleting the file.

When taking the photo, the Xam.Plugin.Media library returns the address where the photo is located: pathfile

Android and iOS works well, but WinPhone not find how to do it.

This is my code for Android and iOS:

PCL project:

public interface IDeleteFile
{
    void delete (string path);
}

Android and iOS project:

public void delete (string path)
{
    try
    {
        File.Delete (path);
    }
    catch (Exception ex)
    {
        System.Diagnostics.Debug.WriteLine ("Exception:" + ex);
    }
}

How would WinPhone?

I hope someone can help me here, thanks

Best Answer

Answers

Sign In or Register to comment.