Bug 7280 - Make methods that require an array as their last parameter use params
Summary: Make methods that require an array as their last parameter use params
Alias: None
Product: iOS
Classification: Xamarin
Component: Xamarin.iOS.dll (show other bugs)
Version: 5.4.x
Hardware: Macintosh Mac OS
: --- enhancement
Target Milestone: Untriaged
Assignee: Bugzilla
Depends on:
Reported: 2012-09-18 16:20 UTC by Yvan Rodrigues
Modified: 2016-02-17 18:56 UTC (History)
2 users (show)

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


Description Yvan Rodrigues 2012-09-18 16:20:06 UTC
The standard classes seem to have a lot of methods that require arrays as parameters, often when only one item is required. I would be 23.6% happier if the params keyword was used so I didn't have to muck around with creating arrays. In fact, since many classes have similar property/method pairs e.g. ViewControllers/SetViewControllers, this would actually make the method version more useful.


Comment 1 Sebastien Pouliot 2012-09-18 17:14:32 UTC
Nice idea! You can likely get this faster (i.e. today) by using extensions methods. We might add them later but we'll keep the original versions (to avoid breaking source compatibility).

Note that UIActionSheet.ctor already ends with params.
Comment 2 Yvan Rodrigues 2012-09-30 11:55:18 UTC
Would it break source compatibility?

Comment 3 Rolf Bjarne Kvinge [MSFT] 2016-02-17 18:56:34 UTC
UIAlertView.ctor already has a params ctor.

In any case I'm keeping this open, since it's a nice suggestion and maybe we could somehow automate this in our generator.

Note You need to log in before you can comment on or make changes to this bug.