Writing the contents of a string to a text file

I should have assumed this existed, based on Ed Poore’s comment on this post, but here’s the actual command:

System.IO.File.WriteAllText

There are multiple overloads for it, but the most basic one is: File.WriteAllText(filePath,contentString).