How can I access a text file in the project explorer “read, write” which is not in the isolated storage in Windows Phone 7?

后端 未结 1 1874
时光取名叫无心
时光取名叫无心 2021-01-27 06:22

How can I access a text file in the project explorer \"read, write\" which is not in the isolated storage in Windows Phone 7? I want it to be in the project explorer for me and

相关标签:
1条回答
  • 2021-01-27 07:12

    I found some resources that useful for you.

    Read File

     var resource = System.Windows.Application.GetResourceStream(new Uri("textfile.txt", UriKind.Relative)
    

    Write File

    using (System.IO.StreamWriter writer = new System.IO.StreamWriter(fileName, true))
    
    {
    
        writer.Write("Write some text here");
    
    }
    

    More information:

    read file in C#

    read text file in windows phone

    write file

    0 讨论(0)
提交回复
热议问题