View Problem

Append to a file

DiskEdit
csharp .Net 2.0 or later
System.IO.File.AppendAllText("filename.txt", "Some text to append to the file");
ExpandDiskEdit
clojure
(with-out-append-writer "output.txt" (println "This is appended to the file"))
ExpandDiskEdit
cpp C++/CLI .NET 2.0
IO::StreamWriter^ stream;

try
{
stream = gcnew IO::StreamWriter("test.txt", true);
stream->WriteLine("This line appended to file!");
}
ExpandDiskEdit
groovy
file << 'some text'
ExpandDiskEdit
fsharp
let stream = new StreamWriter("test.txt", true)
stream.WriteLine("This line appended to file!")

Submit a new solution for csharp, clojure, cpp, groovy ...
There are 12 other solutions in additional languages (erlang, fantom, haskell, java ...)