var leftCurrent = leftArray.GetValue(i);
var rightCurrent = rightArray.GetValue(i);
var mi = typeof (PropertyCompare).GetMethod("NotEqualProperties");
mi.MakeGenericMethod(leftCurrent.GetType());
var notEqualProps = mi.Invoke(null,new []{leftCurrent, rightCurrent});
if(notEqualProps != null)
result.Add(new ArraysDiffResult(i, notEqualProps as List<string>));
Why does this code throws InvalidOperationException ( Late bound operations cannot be performed on types or methods for which ContainsGenericParameters is true.) ?
NotEqualProperties is static generic method..
UPD : I've already found solution. Just forgot to assign new MethodInfo...(Epic Fail..)
But how about performance?