[mono-android] NotImplemenedException in ObservableCollection
Jonathan Pryor
jonp at xamarin.com
Tue Jan 3 20:24:14 EST 2012
On Dec 29, 2011, at 9:44 PM, grauenwolf wrote:
> Really I've got two complaints. The first is a simple, "why is ObservableCollection(IEnumerable<T>) not implemented?"
Good question. I have no good answer; it wasn't implemented until Nov 24 2011:
https://github.com/mono/mono/commit/a04edc9de8a2bacf30ddfc5b486b8221cf506583
We'll be merging this patch into the Mono for Android branch; it _should_ hit the next release.
Doubly odd is that "not implemented" members _should_ have [MonoTODO], but that wasn't visible either.
> More importantly, why is there no warning? This isn't an interface method so it shouldn't even be exposed if it isn't implemented.
There are some exceptions to this, but in general I would agree with you. Historically there's been a lot of variation over what's done with unimplemented members; usually at minimum they get [MonoTODO], but even that was skipped here.
> Or at the very least it should be flagged by the compiler so we know not to use it.
The only way to flag such things with the compiler is via Obsolete, which wouldn't be appropriate. I suppose we could hack the C# compiler...but that would only help those building with mcs, which is _not_ the case for those using Windows.
- Jon
More information about the Monodroid
mailing list