user797717 user797717 - 2 months ago 8
C# Question

FileDiffEngine from FileHelpers Lib fails after upgrade

I have upgraded the FileHelpers Library from 2.0 to the latest 3.1.5 but now the FileDiffEngine does not work anymore.

Code:

var engine = new FileDiffEngine(typeof(CustomClass));


Compiler Error:


Using the generic type 'FileHelpers.FileDiffEngine' requires 1 type argument


Why I am getting this error? The code above is working in Version 2.0 and I am supplying 1 type argument.

Answer

You now specify the type as a generic placeholder:

var engine = new FileDiffEngine<CustomClass>();
Comments