Is there a way to do the following in a single statement?
Code:
If e.Row.HasVersion(DataRowVersion.Proposed) Then
Debug.WriteLine("Proposed = " & e.Row.HasVersion(DataRowVersion.Proposed).ToString)
Else
Debug.WriteLine("Proposed = Nothing")
End If
I thought an IIF statement would do the trick, but it throws a System.Data.VersionNotFoundException exception because IIf always evaluates both truepart and falsepart (even though it returns only one of them).
Code:
Debug.WriteLine("Proposed = " & IIf(e.Row.HasVersion(DataRowVersion.Proposed), e.Row.Item(col, DataRowVersion.Proposed), "Nothing").ToString)