PropertyChanged
プロパティが変更されたときにイベントを処理して発生させるリストクラスを作成しようとしています。
私のメインクラスには、3つの異なるタイプのアイテムをすべて含む3つのリストが含まれています
次のようなことができるようになりたいです
public class MainClass : INotifyPropertyChanged
{
public CustomList<TextRecord> texts{get; set;};
public CustomList<BinaryRecord> binaries{get; set;};
public CustomList<MP3Record> Mp3s{get; set;};
//implement INotifyPropertyChanged
}
public class CustomList<T> where T:(TextRecord, BinaryRecord, MP3Record)
{
//code goes here
}
CustomList クラスにこの制限を設定するにはどうすればよいですか? 前もって感謝します。