This project is read-only.

check if the scintillaNet.Text is changed from the original file text loaded

Topics: Developer Forum, User Forum
May 23, 2009 at 9:56 AM


I want know if this is tha best way to check if was make any modification on the original file.txt modified.

i've loaded the text before whit this //aFile --> c\file.txt

 public void LoadFile(string aFile)
            //Define an ambit where at the outside of it one or more objects will be erased.
            using (StreamReader sr = new StreamReader(aFile, Encoding.UTF8))
                editor.Text = sr.ReadToEnd();

and after i put this line in:

addchar and deleteChar methods

Int32 Changed = this.editor.Text.CompareTo(File.ReadAllText(@"c:\file.txt));


let me know

Thanks for all