If the file you're writing to is plain text, there is no way to do it because plain text doesn't support any formatting. If you're writing to HTML, simply call:
sw.WriteLine("<u>blah blah blah</u>");
If you're writing to another format (such as RTF), you'll have to investigate the formatting codes for that output format.