Monodroid – Write A File

by Jason Carter on April 27, 2011 · 0 comments

In Mono for Android you can write files very simply.

// Compose a string that consists of three lines.
string lines = "First line.\r\nSecond line.\r\nThird line.";

// Write the string to a file.
StreamWriter file = new System.IO.StreamWriter(“/”);
file.WriteLine(lines);

file.Close();

Leave a Comment