c# - How to get last entered textdata from textfile? -
does 1 know how fetch last entered textdata textfile 1 know
var readtxt = file.readalltext(@"d:\file\log.txt");
simple answer: it's impossible unless have prior version of file. imagine, file is
b c
what's happened before? a
added or d
removed or b
changed e
? if have previous version can compute called edit distance, e.g.:
https://en.wikipedia.org/wiki/levenshtein_distance
before after c b c
edit distance (levenshtein one) 1
, edit operation b inserted
. however, edit distance doesn´t guarantee exact editing procedure, provides most probable one.
Comments
Post a Comment