NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

Writing Text to a File

The following example creates a new text file and writes a string to it.

using System;
using System.IO;
public class TextToFile 
{
    public static void Main(String[] args)
    {
        StreamWriter sr = File.CreateText("MyFile.txt");
        sr.WriteLine ("This is my file");
        sr.WriteLine ("I can write ints {0} or floats {1}, etc.", 1, 4.2);
        sr.Close();
        
    }
}