2017-01-17 9 views
-1

私は、番号が1行含まれた.txtファイルを作成しようとしています。私はこのtxtファイルをプログラムで編集可能にしてインストールする必要があります。 番号を置き換える必要がある場合、.txtファイルは完全に上書きされます。UWP vb.netで.txtファイルに書き込む方法

どうすればいいですか?その他のチュートリアルはC#またはJSを参照してください。

+0

を文字列を書き込むには、多くのオンラインコンバータがあります。 – OneFineDay

+0

あなたは例を挙げることができますか? @OneFineDay – luke

+0

http://www.carlosag.net/tools/codetranslator/ – Bugs

答えて

3

Create, write, and read a fileトピックのファイルとのやりとりについては、UWPを参照してください。

は、C#に変換 StorageFile使用に FileIO.WriteTextAsyncまたは FileIO.AppendTextAsync機能

Dim file As StorageFile = Await ApplicationData.Current.LocalFolder.CreateFileAsync("file.txt", CreationCollisionOption.ReplaceExisting) 
Dim strData As String = "sample text to write" 
Await FileIO.WriteTextAsync(file, strData) 
関連する問題