Rats...
...MSDN documentation fails me again.
MSDN says public virtual int CollectionBase.Count {get;}
Reflector says public int CollectionBase.Count {get;}
Visual Studio says cannot override inherited member 'System.Collections.CollectionBase.Count.get' because it is not marked virtual, abstract, or override
Kinda sucks when you're trying to write Unit Tests with TDD and you can't do something as simple as this:
26 [TestFixture]
27 public class PluginCollectionFixture
28 {
29 [Test]
30 public void UponCreationCountIsZero()
31 {
32 PluginCollection collection = new PluginCollection();
33 Assert.AreEqual(0, collection.Count);
34 }
35 }
36
37 public class PluginCollection : CollectionBase
38 {
39 public PluginCollection()
40 {
41 }
42
43 public override int Count
44 {
45 get { return -1; }
46 }
47 }
Oh well. At least I'm going to TechEd. Oh, wait. Never mind.