Read File and replace and write data in file






            StreamReader sr=new StreamReader(@"d:\\file.txt");
            string data = sr.ReadToEnd();
            data = data.Replace("<", "iqbal");
            textBox1.Text = data;
            File.WriteAllText(@"d:\\iqbalpasina2.txt", data);
            MessageBox.Show("Replace Done");

Comments