Needed Help in Notepad

Feb 25 2014 5:21 AM
I am trying to make a Notepad in C#, but i am not able to save the file in *.txt format. However I am able to save the File using the below Code but is not saving it in *.txt Format. Please provide me the Appropriate Solution for this Problem.
 
str = saveFileDialog1.FileName;
saveFileDialog1.Title = "Save File";
saveFileDialog1.DefaultExt = "txt";
saveFileDialog1.ShowDialog();
saveFileDialog1.Filter = "Text Document(*.txt)|File Name(*txt)|All Files(*.*)|*.*";
richTextBox1.SaveFile(saveFileDialog1.FileName);
 
with advance thax,
Ramandeep Singh

Answers (1)