youdon't need to wrap the action

you can just do () => {} ;

On Sat, Aug 18, 2012 at 10:41 PM, Maximilian Wilson <wilson....@gmail.com>wrote:

> I can't remember what causes implicit conversion to fail, but you should
> be able to call the Action ctor explicitly. e.g.
>
> new Action(() => Console.WriteLine("Hello"))
>
> If your lambda is actually returning a value you'll have to discard the
> return value, e.g.
>
> new Action(() => { obj.ToString(); });
>
> -Max
>
>
>  On Sat, Aug 18, 2012 at 5:17 PM, Stephan Steiner <
> stephan.stei...@gmail.com> wrote:
>
>> Hi
>>
>> I have this nice method that performs all kind of magic and allows me to
>> be
>> really lazy - and then when I try using it on MonoDroid, I get the error
>> in
>> the title for every call.
>>
>> Method signature is as follows:
>> private void processRestResponse<T>(T result, IRestResponse response,
>> Action
>> errorAction, Action<T> successAction) where T :
>> ClientInterface.BooleanResult
>>
>> Any ideas on how to work around this without having to start from scratch?
>>
>> Thanks
>> Stephan
>>
>>
>>
>> --
>> View this message in context:
>> http://mono-for-android.1047100.n5.nabble.com/cannot-convert-from-lambda-expression-to-System-Action-tp5711402.html
>> Sent from the Mono for Android mailing list archive at Nabble.com.
>> _______________________________________________
>> Monodroid mailing list
>> Monodroid@lists.ximian.com
>>
>> UNSUBSCRIBE INFORMATION:
>> http://lists.ximian.com/mailman/listinfo/monodroid
>>
>
>
>
> --
> Hahahahaaaa!!! That is ME laughing at YOU, cruel world.
>     -Jordan Rixon
>
> I could not love thee, dear, so much,
> Loved I not Honour more.
>
>
> _______________________________________________
> Monodroid mailing list
> Monodroid@lists.ximian.com
>
> UNSUBSCRIBE INFORMATION:
> http://lists.ximian.com/mailman/listinfo/monodroid
>
>


-- 
Extreme Knowledge is not something for which he programs a computer but for
which his computer is programming him.

-Wozniak


   - if my programming advice has helped you, feel free to donate to :
<https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=KYUXV2PG88YQQ>

<https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=KYUXV2PG88YQQ>
<https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=KYUXV2PG88YQQ>
_______________________________________________
Monodroid mailing list
Monodroid@lists.ximian.com

UNSUBSCRIBE INFORMATION:
http://lists.ximian.com/mailman/listinfo/monodroid

Reply via email to