I had a code like this
dataset.DataVersion.AddDataVersionRow((new FileInfo(path + PermissionFile)).LastWriteTime.Ticks);
But when some changed it for getting some other functionality sometimes it is not working,i dont know
why it is not working.This is the modified ,not working code
long version = (new FileInfo(path + PermissionFile)).LastWriteTime.Ticks;
if (dataset.DataVersion.Count == 0)
{
dataset.DataVersion.AddDataVersionRow(version);
}
else if (version > dataset.DataVersion[0].Version)
{
dataset.DataVersion[0].Version = version;
}
Do i need to add one more else loop here
Hard to answer without more information, but maybe you want to update the last entry in DataVersion: