locked
StorageFile class, write and read to disk

    Question

  • Hi

    Is there a way to preserve a object of StorageFil to the disk???

    I have tried both Json and XML serializers,, but none of them are able to serialize a object of type StorageFile.

    StorageFile file = filePicker.PickSingleFileAsync();
    
    string json = JsonConvert.SerializeObject(file);
    <Save json to disk>
    .....
    .....
    .....
    
    <recover json from disk>
    String json = ...
    
    StorageFile file = JsonConvert.DeserializeObject<StorageFile>(json);

    //regards


    lg


    Saturday, March 08, 2014 10:34 AM

Answers

All replies