I'm sorry for the misunderstanding. What I meant was that console doesn't stay up so that I can enter the text in. But I got it to work now. Small overlooked error:
Code:
using System;
using System.Collections.Generic;
using System.Text;
using System.IO;
public class writetext
{
static void Main()
{
//Ask for text to write to buffer
Console.WriteLine("What would you like to write to text file? ");
Console.Read();
string buffer = Console.ReadLine();
//Write buffer to textfile
string path = @"C:/Users/MyName/Documents/C# file.txt";
StreamWriter txtwrite = new StreamWriter(path);
txtwrite.WriteLine(buffer);
txtwrite.Close();
txtwrite.Dispose();
}
}