Stephan Steiner | 19 Aug 2012 02:17
Picon

cannot convert from 'lambda expression' to 'System.Action'

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.
Konaju Games (Dev | 19 Aug 2012 02:39
Gravatar

Re: cannot convert from 'lambda expression' to 'System.Action'

You need to show sample code for how you are trying to call it.

Sly

On 19 Aug 2012 10:17, "Stephan Steiner" <stephan.steiner-Re5JQEeQqe8@public.gmane.orgm> 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-m0oaEdqWWQ8Czk1rzwDQAw@public.gmane.org

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

<div>
<p dir="ltr">You need to show sample code for how you are trying to call it.</p>
<p dir="ltr">Sly</p>
<div class="gmail_quote">On 19 Aug 2012 10:17, "Stephan Steiner" &lt;<a href="mailto:stephan.steiner@...">stephan.steiner@...m</a>&gt; wrote:<br type="attribution"><blockquote class="gmail_quote">
Hi<br><br>
I have this nice method that performs all kind of magic and allows me to be<br>
really lazy - and then when I try using it on MonoDroid, I get the error in<br>
the title for every call.<br><br>
Method signature is as follows:<br>
private void processRestResponse&lt;T&gt;(T result, IRestResponse response, Action<br>
errorAction, Action&lt;T&gt; successAction) where T :<br>
ClientInterface.BooleanResult<br><br>
Any ideas on how to work around this without having to start from scratch?<br><br>
Thanks<br>
Stephan<br><br><br><br>
--<br>
View this message in context: <a href="http://mono-for-android.1047100.n5.nabble.com/cannot-convert-from-lambda-expression-to-System-Action-tp5711402.html" target="_blank">http://mono-for-android.1047100.n5.nabble.com/cannot-convert-from-lambda-expression-to-System-Action-tp5711402.html</a><br>

Sent from the Mono for Android mailing list archive at Nabble.com.<br>
_______________________________________________<br>
Monodroid mailing list<br><a href="mailto:Monodroid@...">Monodroid@...</a><br><br>
UNSUBSCRIBE INFORMATION:<br><a href="http://lists.ximian.com/mailman/listinfo/monodroid" target="_blank">http://lists.ximian.com/mailman/listinfo/monodroid</a><br><br>
</blockquote>
</div>
</div>
Maximilian Wilson | 19 Aug 2012 05:41
Picon

Re: cannot convert from 'lambda expression' to 'System.Action'

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.steiner <at> 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-m0oaEdqWWQ8Czk1rzwDQAw@public.gmane.org

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.

<div>
<p>I can't remember what causes implicit conversion to fail, but you should be able to call the Action ctor explicitly. e.g.</p>
<div><br></div>
<div>new Action(() =&gt; Console.WriteLine("Hello"))</div>
<div><br></div>
<div>If your lambda is actually returning a value you'll have to discard the return value, e.g.&nbsp;</div>
<div><br></div>
<div>new Action(() =&gt; { obj.ToString(); });<div><br></div>
<div>-Max<br><br><div class="gmail_quote">
On Sat, Aug 18, 2012 at 5:17 PM, Stephan Steiner <span dir="ltr">&lt;<a href="mailto:stephan.steiner@..." target="_blank">stephan.steiner <at> gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote">
Hi<br><br>
I have this nice method that performs all kind of magic and allows me to be<br>
really lazy - and then when I try using it on MonoDroid, I get the error in<br>
the title for every call.<br><br>
Method signature is as follows:<br>
private void processRestResponse&lt;T&gt;(T result, IRestResponse response, Action<br>
errorAction, Action&lt;T&gt; successAction) where T :<br>
ClientInterface.BooleanResult<br><br>
Any ideas on how to work around this without having to start from scratch?<br><br>
Thanks<br>
Stephan<br><br><br><br>
--<br>
View this message in context: <a href="http://mono-for-android.1047100.n5.nabble.com/cannot-convert-from-lambda-expression-to-System-Action-tp5711402.html" target="_blank">http://mono-for-android.1047100.n5.nabble.com/cannot-convert-from-lambda-expression-to-System-Action-tp5711402.html</a><br>

Sent from the Mono for Android mailing list archive at Nabble.com.<br>
_______________________________________________<br>
Monodroid mailing list<br><a href="mailto:Monodroid@...">Monodroid@...</a><br><br>
UNSUBSCRIBE INFORMATION:<br><a href="http://lists.ximian.com/mailman/listinfo/monodroid" target="_blank">http://lists.ximian.com/mailman/listinfo/monodroid</a><br>
</blockquote>
</div>
<br><br clear="all"><div><br></div>-- <br><div>Hahahahaaaa!!! That is&nbsp;ME&nbsp;laughing&nbsp;at&nbsp;YOU, cruel world.<div>&nbsp; &nbsp; -Jordan Rixon<br>
</div>
</div>
<div><br></div>
<div>I could not love thee, dear, so much,<div>
Loved I not Honour more.</div>
</div>
<br>
</div>
</div>
</div>
Stephan Steiner | 22 Aug 2012 14:49
Picon

Re: cannot convert from 'lambda expression' to 'System.Action'

Turns out this error only creeps up when there's a compilation error. Then
suddenly, it bitches about all calls to this particular method.

When I initially posted, Visual Studio was doing something funky, too, and
showing any call to that particular method with a red wave underline. I
still see this happening from time to time when I'm debugging, even though
the method can be executed without issues.

Could this be a Visual Studio + Mono4Android specific issue?  I have the
same code running in a regular PC project and never had any issues.

Regards
Stephan

--
View this message in context: http://mono-for-android.1047100.n5.nabble.com/cannot-convert-from-lambda-expression-to-System-Action-tp5711402p5711448.html
Sent from the Mono for Android mailing list archive at Nabble.com.
Maximilian Wilson | 22 Aug 2012 16:58
Picon

Re: cannot convert from 'lambda expression' to 'System.Action'

Wait, you're getting this error at runtime? Usually it's a compile-time error. It would be interesting to see how you are calling it.

As an aside, you might want to look into IObservable<T> by the way. It looks a lot like your method signature, but it also abstracts out merging, fork/join, and marshalling control flow across threads. You might find it an interesting abstraction.

-Max

On Wed, Aug 22, 2012 at 5:49 AM, Stephan Steiner <stephan.steiner-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
Turns out this error only creeps up when there's a compilation error. Then
suddenly, it bitches about all calls to this particular method.

When I initially posted, Visual Studio was doing something funky, too, and
showing any call to that particular method with a red wave underline. I
still see this happening from time to time when I'm debugging, even though
the method can be executed without issues.

Could this be a Visual Studio + Mono4Android specific issue?  I have the
same code running in a regular PC project and never had any issues.

Regards
Stephan



--
View this message in context: http://mono-for-android.1047100.n5.nabble.com/cannot-convert-from-lambda-expression-to-System-Action-tp5711402p5711448.html
Sent from the Mono for Android mailing list archive at Nabble.com.
_______________________________________________
Monodroid mailing list
Monodroid-m0oaEdqWWQ8Czk1rzwDQAw@public.gmane.org

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.

<div>
<p>Wait, you're getting this error at runtime? Usually it's a compile-time error. It would be interesting to see how you are calling it.<br><br>As an aside, you might want to look into IObservable&lt;T&gt; by the way. It looks a lot like your method signature, but it also abstracts out merging, fork/join, and marshalling control flow across threads. You might find it an interesting abstraction.<br><br>-Max<br><br></p>
<div class="gmail_quote">On Wed, Aug 22, 2012 at 5:49 AM, Stephan Steiner <span dir="ltr">&lt;<a href="mailto:stephan.steiner <at> gmail.com" target="_blank">stephan.steiner@...</a>&gt;</span> wrote:<br><blockquote class="gmail_quote">
Turns out this error only creeps up when there's a compilation error. Then<br>
suddenly, it bitches about all calls to this particular method.<br><br>
When I initially posted, Visual Studio was doing something funky, too, and<br>
showing any call to that particular method with a red wave underline. I<br>
still see this happening from time to time when I'm debugging, even though<br>
the method can be executed without issues.<br><br>
Could this be a Visual Studio + Mono4Android specific issue? &nbsp;I have the<br>
same code running in a regular PC project and never had any issues.<br><br>
Regards<br>
Stephan<br><br><br><br>
--<br>
View this message in context: <a href="http://mono-for-android.1047100.n5.nabble.com/cannot-convert-from-lambda-expression-to-System-Action-tp5711402p5711448.html" target="_blank">http://mono-for-android.1047100.n5.nabble.com/cannot-convert-from-lambda-expression-to-System-Action-tp5711402p5711448.html</a><br><div class="HOEnZb"><div class="h5">Sent from the Mono for Android mailing list archive at Nabble.com.<br>
_______________________________________________<br>
Monodroid mailing list<br><a href="mailto:Monodroid@...">Monodroid@...</a><br><br>
UNSUBSCRIBE INFORMATION:<br><a href="http://lists.ximian.com/mailman/listinfo/monodroid" target="_blank">http://lists.ximian.com/mailman/listinfo/monodroid</a><br>
</div></div>
</blockquote>
</div>
<br><br clear="all"><div><br></div>-- <br><div>Hahahahaaaa!!! That is&nbsp;ME&nbsp;laughing&nbsp;at&nbsp;YOU, cruel world.<div>&nbsp; &nbsp; -Jordan Rixon<br>
</div>
</div>
<div><br></div>
<div>I could not love thee, dear, so much,<div>
Loved I not Honour more.</div>
</div>
<br>
</div>
Stephan Steiner | 28 Aug 2012 12:28
Picon

Re: cannot convert from 'lambda expression' to 'System.Action'

Here's one call to the method:

public OperationResult BeginLogin(string login, string password, string
sessionId, string clientVersion)
        {
            try
            {
                writeLog(string.Format("{0} - {1} - login: {2}, sessionId:
{3}", myName, GetMethodName(1), login, sessionId), 2);
                var request = new RestRequest("MobileLogin", Method.POST);
                request.RequestFormat = DataFormat.Json;
                request.AddBody(new MobileLoginParameters { Login = login,
Password = password, SessionId = sessionId, ClientVersion = clientVersion
});

                client.ExecuteAsync(request, response => 
                {
                    processRestResponse(new LoginResult(), response, () =>
                    {
                        OnLoginComplete(new LoginEventArgs { Result = new
LoginResult { Code = BooleanOperationResultCode.GenericError } });
                    }, (res) =>
                    {
                        if (res.Code == BooleanOperationResultCode.Success)
                            currentSessionId = sessionId;
                        OnLoginComplete(new LoginEventArgs { Result = res
});
                    });
                });
                return new OperationResult { Code =
OperationResultCode.Success };
            }
            catch (Exception e)
            {
                return processErrorInBeginMethod(e);
            }
        }

And I currently have it again while running - all kinds of methods are red
underlined - I have "Cannot implicitly convert to
ClientInterface.LoginResult" for

ClientInterface.LoginResult res = smartAppServer.EndMobileLogin(ar);

(declaration: protected ISmartAppMobile smartAppServer = null;

and ISmartAppMobile interface:

        [OperationContract]
        [WebInvoke()]
        LoginResult MobileLogin(MobileLoginParameters parameters);

)... it goes down to usings that it doesn't like, types or namespaces not
found, etc. Funny thing is that it all runs just fine.

I'm beginning to doubt the VS plugin :(

As for IObservable - it would involve a major rewrite. Currently I have one
monolithic class that does communication for everything (so they all have
access to the same shared information like the remote server reference,
session Id, initialization and connection state) and the quick look I had at
the interface definition makes me think it would mean ripping my connector
class into different bits - one per method.

I've also started looking at TinyMessenger as alternative to all my event
wiring up code, but it seems to me, you cannot quite get around writing
plumbing code in any case. But I fear we're getting off topic now (not that
it's not an interesting topic for discussion..)

Stephan

Wait, you're getting this error at runtime? Usually it's a compile-time
error. It would be interesting to see how you are calling it.

As an aside, you might want to look into IObservable<T> by the way. It
looks a lot like your method signature, but it also abstracts out merging,
fork/join, and marshalling control flow across threads. You might find it
an interesting abstraction.

-Max

--
View this message in context: http://mono-for-android.1047100.n5.nabble.com/cannot-convert-from-lambda-expression-to-System-Action-tp5711402p5711590.html
Sent from the Mono for Android mailing list archive at Nabble.com.
Maximilian Wilson | 28 Aug 2012 17:16
Picon

Re: cannot convert from 'lambda expression' to 'System.Action'

On Tue, Aug 28, 2012 at 3:28 AM, Stephan Steiner <stephan.steiner-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
And I currently have it again while running - all kinds of methods are red
underlined - I have "Cannot implicitly convert to
ClientInterface.LoginResult" for

ClientInterface.LoginResult res = smartAppServer.EndMobileLogin(ar);

(declaration: protected ISmartAppMobile smartAppServer = null;

and ISmartAppMobile interface:

        [OperationContract]
        [WebInvoke()]
        LoginResult MobileLogin(MobileLoginParameters parameters);

)... it goes down to usings that it doesn't like, types or namespaces not
found, etc. Funny thing is that it all runs just fine.

I'm beginning to doubt the VS plugin :(

Hmmm. I have actually seen this kind of thing with standard VS, where the Intellisense parser gives incorrect results which cause errors. In that case what happened was that there was a namespace declaration in one file, generated by VS via "Add Class" I believe, which had a duplicate element:

namespace Contoso.Game.Geometry.Contoso.Game.Geometry.TwoDimensional
{
}

Somehow that made the project produce incorrect results (type not found, can't convert Foo to Foo, etc.) in all the other files of the project. Anyway, it might be worth doing a quick grep/findstr over your namespace declarations to look for duplicates.

Wish I could be of more help.

-Max

--
Hahahahaaaa!!! That is ME laughing at YOU, cruel world.
    -Jordan Rixon

I could not love thee, dear, so much,
Loved I not Honour more.

<div>
<div class="gmail_quote">On Tue, Aug 28, 2012 at 3:28 AM, Stephan Steiner <span dir="ltr">&lt;<a href="mailto:stephan.steiner@..." target="_blank">stephan.steiner@...</a>&gt;</span> wrote:<br><blockquote class="gmail_quote">
And I currently have it again while running - all kinds of methods are red<br>
underlined - I have "Cannot implicitly convert to<br>
ClientInterface.LoginResult" for<br><br>
ClientInterface.LoginResult res = smartAppServer.EndMobileLogin(ar);<br><br>
(declaration: protected ISmartAppMobile smartAppServer = null;<br><br>
and ISmartAppMobile interface:<br><br>
&nbsp; &nbsp; &nbsp; &nbsp; [OperationContract]<br>
&nbsp; &nbsp; &nbsp; &nbsp; [WebInvoke()]<br>
&nbsp; &nbsp; &nbsp; &nbsp; LoginResult MobileLogin(MobileLoginParameters parameters);<br><br>
)... it goes down to usings that it doesn't like, types or namespaces not<br>
found, etc. Funny thing is that it all runs just fine.<br><br>
I'm beginning to doubt the VS plugin :(<br>
</blockquote>
</div>
<br clear="all"><div>Hmmm. I have actually seen this kind of thing with standard VS, where the Intellisense parser gives incorrect results which cause errors. In that case what happened was that there was a namespace declaration in one file, generated by VS via "Add Class" I believe, which had a duplicate element:<br><br>namespace Contoso.Game.Geometry.Contoso.Game.Geometry.TwoDimensional</div>
<div>{</div>
<div>}</div>
<div>
<br>Somehow that made the project produce incorrect results (type not found, can't convert Foo to Foo, etc.) in all the other files of the project. Anyway, it might be worth doing a quick grep/findstr over your namespace declarations to look for duplicates.<br><br>Wish I could be of more help.<br><br>-Max<br><br>
</div>-- <br><div>Hahahahaaaa!!! That is&nbsp;ME&nbsp;laughing&nbsp;at&nbsp;YOU, cruel world.<div>&nbsp; &nbsp; -Jordan Rixon<br>
</div>
</div>
<div><br></div>
<div>I could not love thee, dear, so much,<div>
Loved I not Honour more.</div>
</div>
<br>
</div>
Sayed Arian Kooshesh | 19 Aug 2012 06:03
Picon
Gravatar

Re: cannot convert from 'lambda expression' to 'System.Action'

youdon't need to wrap the action

you can just do () => {} ;

On Sat, Aug 18, 2012 at 10:41 PM, Maximilian Wilson <wilson.max-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 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.steiner <at> 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 <at> 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-m0oaEdqWWQ8Czk1rzwDQAw@public.gmane.org

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 : 

<div>
<p>youdon't need to wrap the action<br><br>you can just do () =&gt; {} ;<br><br></p>
<div class="gmail_quote">On Sat, Aug 18, 2012 at 10:41 PM, Maximilian Wilson <span dir="ltr">&lt;<a href="mailto:wilson.max@..." target="_blank">wilson.max@...</a>&gt;</span> wrote:<br><blockquote class="gmail_quote">I can't remember what causes implicit conversion to fail, but you should be able to call the Action ctor explicitly. e.g.<div>

<br>
</div>
<div>new Action(() =&gt; Console.WriteLine("Hello"))</div>
<div><br></div>
<div>If your lambda is actually returning a value you'll have to discard the return value, e.g.&nbsp;</div>
<div><br></div>
<div>new Action(() =&gt; { obj.ToString(); });<div><br></div>
<div>-Max<div><div class="h5">
<br><br><div class="gmail_quote">
On Sat, Aug 18, 2012 at 5:17 PM, Stephan Steiner <span dir="ltr">&lt;<a href="mailto:stephan.steiner@..." target="_blank">stephan.steiner <at> gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote">

Hi<br><br>
I have this nice method that performs all kind of magic and allows me to be<br>
really lazy - and then when I try using it on MonoDroid, I get the error in<br>
the title for every call.<br><br>
Method signature is as follows:<br>
private void processRestResponse&lt;T&gt;(T result, IRestResponse response, Action<br>
errorAction, Action&lt;T&gt; successAction) where T :<br>
ClientInterface.BooleanResult<br><br>
Any ideas on how to work around this without having to start from scratch?<br><br>
Thanks<br>
Stephan<br><br><br><br>
--<br>
View this message in context: <a href="http://mono-for-android.1047100.n5.nabble.com/cannot-convert-from-lambda-expression-to-System-Action-tp5711402.html" target="_blank">http://mono-for-android.1047100.n5.nabble.com/cannot-convert-from-lambda-expression-to-System-Action-tp5711402.html</a><br>

Sent from the Mono for Android mailing list archive at Nabble.com.<br>
_______________________________________________<br>
Monodroid mailing list<br><a href="mailto:Monodroid@..." target="_blank">Monodroid <at> lists.ximian.com</a><br><br>
UNSUBSCRIBE INFORMATION:<br><a href="http://lists.ximian.com/mailman/listinfo/monodroid" target="_blank">http://lists.ximian.com/mailman/listinfo/monodroid</a><br>
</blockquote>
</div>
<br><br clear="all"><div><br></div>
</div></div>
<span class="HOEnZb">-- <br><div>Hahahahaaaa!!! That is&nbsp;ME&nbsp;laughing&nbsp;at&nbsp;YOU, cruel world.<div>&nbsp; &nbsp; -Jordan Rixon<br>
</div>
</div>
<div><br></div>
<div>I could not love thee, dear, so much,<div>
Loved I not Honour more.</div>
</div>
<br></span>
</div>
</div>
<br>_______________________________________________<br>
Monodroid mailing list<br><a href="mailto:Monodroid@...">Monodroid@...</a><br><br>
UNSUBSCRIBE INFORMATION:<br><a href="http://lists.ximian.com/mailman/listinfo/monodroid" target="_blank">http://lists.ximian.com/mailman/listinfo/monodroid</a><br><br>
</blockquote>
</div>
<br><br clear="all"><br>-- <br>Extreme Knowledge is not something for which he programs a computer but for which his computer is programming him.<br><br>-Wozniak<br><br><ul>
<li>if my programming advice has helped you, feel free to <a href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&amp;hosted_button_id=KYUXV2PG88YQQ" target="_blank">donate to :&nbsp;</a>
</li>

</ul>
<a href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&amp;hosted_button_id=KYUXV2PG88YQQ" target="_blank"> </a><a href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&amp;hosted_button_id=KYUXV2PG88YQQ" target="_blank"> </a><br>
</div>
Maximilian Wilson | 25 Aug 2012 00:07
Picon

Re: cannot convert from 'lambda expression' to 'System.Action'

 On Sat, Aug 18, 2012 at 9:03 PM, Sayed Arian Kooshesh <kooshesh <at> gmail.com> wrote:

youdon't need to wrap the action

you can just do () => {} ;

 
Most of the time, yes. In some cases the implicit conversion fails, though as I mentioned I don't remember the specific cases where I've hit this. (I think when the callee is expecting a Delegate object, vs. some specific Delegate type.)

-Max


--
Hahahahaaaa!!! That is ME laughing at YOU, cruel world.
    -Jordan Rixon

I could not love thee, dear, so much,
Loved I not Honour more.

<div>
<p>&nbsp;On Sat, Aug 18, 2012 at 9:03 PM, Sayed Arian Kooshesh&nbsp;<span dir="ltr">&lt;<a href="mailto:kooshesh@..." target="_blank">kooshesh <at> gmail.com</a>&gt;</span>&nbsp;wrote:<br></p>
<blockquote class="gmail_quote">
youdon't need to wrap the action<br><br>you can just do () =&gt; {} ;<div><br class="Apple-interchange-newline"></div>
</blockquote>
<div>&nbsp;</div>Most of the time, yes. In some cases the implicit conversion fails, though as I mentioned I don't remember the specific cases where I've hit this. (I think when the callee is expecting a Delegate object, vs. some specific Delegate type.)<br><br>-Max<br><br clear="all"><div><br></div>-- <br><div>Hahahahaaaa!!! That is&nbsp;ME&nbsp;laughing&nbsp;at&nbsp;YOU, cruel world.<div>&nbsp; &nbsp; -Jordan Rixon<br>
</div>
</div>
<div><br></div>
<div>I could not love thee, dear, so much,<div>Loved I not Honour more.</div>
</div>
<br>
</div>

Gmane