The following code gives the error "Cannot convert type 'Calendar.Month' to 'System.Collections.Generic.List'":
public class Month : List<Day>, INotifyPropertyChanged
{
public Month() { /* NOP */ }
public new void Add<Day>(Day pValue)
{
var list = (List<Day>)this;
list.Add(pValue);
}
}
I have studied the advice here: Why does calling a method in my derived class call the base class method?
and here:
C# Call shadow method with generic cast
I want to override the List.Add(...) method with a Month.Add(...) method to send an event to the target XAML container classes and then call the overridden List.Add(...) method.
By the way, I am using VS2012, .NET 4.5, and the application is for Win Phone 8 (later versions are not presently an option - sorry). I mention this because I know from experience a lot changed between Win Phone 8 and Win 10.