I am getting the following message when trying to delete FileInfo:
The type arguments for method 'System.Linq.Enumerable.Select(System.Collections.Generic.IEnumerable, System.Func)' cannot be inferred from the usage. Try specifying the type arguments explicitly.
Here is my code:
private void btn_Click(object sender, EventArgs e)
{
List<FileInfo> duplicatedFiles = Fso.GetAllDuplicatedFiles(@"C:\", true);
duplicatedFiles.Cast<FileInfo>().Select(f => f.Delete());
}
Thanks for any help