Monodroid – Write A File

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(“/”);


  • IVAN

    But, how can I define the file name?
    StreamWriter file = new System.IO.StreamWriter(“/file.txt”); //doesn’t seem to work…
    tnhx in advance…