update data on file change?
public DataUpdater(string file, ref DataTable data)
{
FileSystemWatcher fileWatcher = new FileSystemWatcher();
fileWatcher.Path = Path.GetDirectoryName(file);
fileWatcher.Filter = Path.GetFileName(file);
fileWatcher.NotifyFilter = NotifyFilters.LastWrite;
fileWatcher.Changed += (sender, e) =>
{
ref data = CSVParser.ParseCSV(file);
};
}
Hello, i'm trying to update a data table variable when a file changes but
the output says i cant have a ref or out in the changed event. please help
No comments:
Post a Comment