Bug 1735 - Provide string overloads for things that take ICharSequence
Summary: Provide string overloads for things that take ICharSequence
Alias: None
Product: Android
Classification: Xamarin
Component: BCL Class Libraries ()
Version: 1.0
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: Bugzilla
Depends on:
Reported: 2011-10-27 16:18 UTC by Jonathan Pobst
Modified: 2011-11-17 17:37 UTC (History)
3 users (show)

Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:

Description Jonathan Pobst 2011-10-27 16:18:18 UTC
It would be nice to provide a string overload for stuff like:

Android.Views.IMenu.Add (ICharSequence title)

so people can write:

menu.Add ("My Menu Item");

instead of:

menu.Add (new Java.Lang.String ("My Menu Item"));
Comment 1 Atsushi Eno 2011-10-28 09:52:06 UTC
I don't think this is always good. There are interfaces that take CharSequence e.g. [*1]. And if we add overload for string everywhere, it will end up to impose on users to implement such methods at any time.

[*1] http://developer.android.com/reference/android/view/inputmethod/InputConnection.html#commitText%28java.lang.CharSequence,%20int%29
Comment 2 Jonathan Pryor 2011-11-17 17:37:26 UTC
Fixed in 2b273c23.