I am new to C#. Basically I want to implement an auto save function using a timer. May I know how do I have to implement it, so that the text will get saved automatically every 5 seconds?
SaveFileDialog saveFile1 = new SaveFileDialog();
saveFile1.DefaultExt = "*.rtf";
saveFile1.Filter = "RTF Files|*.rtf";
if (saveFile1.ShowDialog() == System.Windows.Forms.DialogResult.OK &&
saveFile1.FileName.Length > 0)
{
txtb.SaveFile(saveFile1.FileName, RichTextBoxStreamType.PlainText);
I can save the file but how do I auto save it?