you can find the updated fields by comparing the actual version fields with the version fields before.
Example code can be found here: http://charliedigital.com/2011/03/04/getting-version-changes-from-sharepoint/
Keep also a view on fields which are null and which contains equal strings. Hence I changed the foreach loop like this:
foreach (SPField field in currVersion.Fields)
{
if (field.ShowInVersionHistory == false)
{
continue;
}
if (prevVersion == null)
{
iCntChanges++;
//Console.Out.WriteLine(" > {0} changed to \"{1}\"",
// field.StaticName, currentVersion[field.StaticName]);
continue;
}
// if both are null, avoid errors below
if (currVersion[field.StaticName] == null && prevVersion[field.StaticName] == null)
{
continue;
}
// if one is null, avoid errors below and we have a difference found
if (currVersion[field.StaticName] == null || prevVersion[field.StaticName] == null)
{
iCntChanges++;
strFieldsChanged += ", " + field.StaticName + "(einer ist null)";
}
if (currVersion[field.StaticName].Equals(prevVersion[field.StaticName]))
{
continue;
}
if (currVersion[field.StaticName].ToString() == prevVersion[field.StaticName].ToString())
continue;
iCntChanges++;
strFieldsChanged += ", " + field.StaticName + "(" + currVersion[field.StaticName].ToString()
+ ", " + prevVersion[field.StaticName].ToString() + ")";
//Console.Out.WriteLine(" > {0} changed from \"{1}\" to \"{2}\"",
// field.StaticName, previousVersion[field.StaticName], currentVersion[field.StaticName]);
}
Kind Regards
Ernst