G
Geoff
....Or, to put it another way, why doesn't something like this work?
public class RecordCollection : List<Record>
{
//Some code snipped
public override int Count
{
get
{
return someCustomCount;
}
}
}
The error the compiler gives is 'cannot override inherited member
'System.Collections.Generic.List<OpinionatedGeek.Applications.Alchemy.Record>.Count.get'
because it is not marked virtual, abstract, or override'
That may well be true, but
'System.Collections.Generic.List<>.Count.get' _is_ marked virtual. How
do I go about overriding it? Or is it just not possible?
Any ideas? Or any better places to post this question?
Many thanks,
Geoff
public class RecordCollection : List<Record>
{
//Some code snipped
public override int Count
{
get
{
return someCustomCount;
}
}
}
The error the compiler gives is 'cannot override inherited member
'System.Collections.Generic.List<OpinionatedGeek.Applications.Alchemy.Record>.Count.get'
because it is not marked virtual, abstract, or override'
That may well be true, but
'System.Collections.Generic.List<>.Count.get' _is_ marked virtual. How
do I go about overriding it? Or is it just not possible?
Any ideas? Or any better places to post this question?
Many thanks,
Geoff