if e.Row.Item[i, System.Data.DataRowVersion.Current] <> e.Row.Item[i, System.Data.DataRowVersion.Original] then //do something
The “Do something” code is always executed.
The values are boxed types:
for the first index, I would expect that the values are compared using the Int32 implementation, for the second with the String implementation. But it looks like it is doing the Object implementation that checks if the references are equal. And those references are never equal.
Is this a bug or am I doing something wrong? (as this works in VB and in C# as far as I know).