D
Dennis Homann
Hi all,
I do understand the need for virtual/override/new and also when to use what.
.... at least I thought so.
Why does the following code result in a CS0506 compiler error (should
translate to sth like "ReadOnlyCollectionBase.GetEnumerator() is not
declared as virtual, abstract, or override")?
public class MyCollection : ReadOnlyCollectionBase {
public override IEnumerator GetEnumerator() {
return null;
}
}
Please ignore the fact that this class is useless. I just tried to create a
minimal example.
According to the documentation and ildasm
System.Collections.ReadOnlyCollection.GetEnumerator() IS declared as
virtual.
Thanks,
Dennis
I do understand the need for virtual/override/new and also when to use what.
.... at least I thought so.
Why does the following code result in a CS0506 compiler error (should
translate to sth like "ReadOnlyCollectionBase.GetEnumerator() is not
declared as virtual, abstract, or override")?
public class MyCollection : ReadOnlyCollectionBase {
public override IEnumerator GetEnumerator() {
return null;
}
}
Please ignore the fact that this class is useless. I just tried to create a
minimal example.
According to the documentation and ildasm
System.Collections.ReadOnlyCollection.GetEnumerator() IS declared as
virtual.
Thanks,
Dennis