[mono-android] selecting contacts
Jonathan Pryor
jpryor at novell.com
Thu Mar 31 15:21:44 EDT 2011
On Mar 31, 2011, at 3:11 PM, John Murray wrote:
> Errr? Do you mean the previous erroneous code or the new stuff ?
I mean shouldn't missing an `override` keyword (and thus "hiding" a base class member) elicit a warning from the compiler, mentioning that you should either use `override` or use `new`?
E.g. if I miss the 'override' on OnCreate():
Hello.cs(223,32): warning CS0114: `Mono.Samples.Hello.HelloActivity.OnCreate(Android.OS.Bundle)' hides inherited member `Mono.Samples.Hello.LibraryActivity.OnCreate(Android.OS.Bundle)'. To make the current member override that implementation, add the override keyword. Otherwise add the new keyword
Writing warning-free code would thus have avoided the issue in the first place. :-)
- Jon
More information about the Monodroid
mailing list