Is it possible to overload Extension Methods?
I did something like this
public static ExcelWorksheet CreateSheet(this ExcelPackage thisPackage, List<Document> list)
{
ExcelWorksheet worksheet = thisPackage.Workbook.Worksheets.Add("Documents");
return worksheet;
}
public static ExcelWorksheet CreateSheet(this ExcelWorksheet thisPackage, List<Book> list)
{
ExcelWorksheet worksheet = thisPackage.Workbook.Worksheets.Add("Books");
return worksheet;
}
In this case, It recognizes only the first method as an extension method and Ignores the second method without any Compiler Warnings or Errors.