[IronPython] Default-valued arguments to C# functions
Curt Hagenlocher
curt at hagenlocher.org
Sat Apr 24 05:43:52 CEST 2010
On Fri, Apr 23, 2010 at 8:43 PM, Curt Hagenlocher <curt at hagenlocher.org>wrote:
> On Fri, Apr 23, 2010 at 4:57 PM, Jeff Hardy <jdhardy at gmail.com> wrote:
>
>> I've got some functions implemented in C# that need to have optional,
>> defaulted parameters. So far I've been declaring them similar to:
>>
>> public object cursor(CodeContext context,
>> [Optional][DefaultValue(null)]object factory)
>
>
> I think you need to use DefaultValueParameter instead of DefaultValue. It's
> an easy mistake to make -- I've made it myself. :(
>
Gah! I mean "DefaultParameterValue".
-Curt
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ironpython-users/attachments/20100423/55fb169c/attachment.html>
More information about the Ironpython-users
mailing list