View Problem

Write a string to a file

ExpandDiskEdit
fsharp
let stream = new StreamWriter("test.txt", false)
stream.WriteLine("This line overwrites file contents!")
ExpandDiskEdit
cpp C++/CLI .NET 2.0
IO::StreamWriter^ stream;

try
{
stream = gcnew IO::StreamWriter("test.txt", false);
stream->WriteLine("This line overwites file contents!");
}

Submit a new solution for fsharp or cpp
There are 17 other solutions in additional languages (clojure, csharp, erlang, fantom ...)