Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 990175
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T05:54:27+00:00 2026-05-16T05:54:27+00:00

Why does i have this error and how to fix it. Thanks for help

  • 0

Why does i have this error and how to fix it. Thanks for help

Error 4 Cannot convert lambda expression to type ‘System.Delegate’ because it is not a delegate type

    void provider_GetAssignmentsComplete(object sender, QP_Truck_Model.Providers.GetAssignmentsEventArgs e) {
        lvMyAssignments.Dispatcher.BeginInvoke(() =>
        {
            lvMyAssignments.ItemsSource = e.HandOverDocs;
        });
    }
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T05:54:28+00:00Added an answer on May 16, 2026 at 5:54 am

    Lambda expression are not implicitly convertible to delegates in certain cases. Specifically, if the method expects the type Delegate you have to first explicitly cast the lambda for the compiler to accept it.

    What you can do is explicitly cast the lambda, which should allow you to use BeginInvoke:

    lvMyAssignments.Dispatcher.BeginInvoke( (Action)(() => 
            { 
                lvMyAssignments.ItemsSource = e.HandOverDocs; 
            })); 
    

    Normally, if you have a method with a strongly-typed delegate signature, like:

    public static void BeginInvoke( Action d ) { ... }
    

    The compiler can convert a lambda expression to the appropriate delegate signature needed. But if the method is loosely typed:

    public static void BeginInvoke( Delegate d ) { ... }
    

    the compiler will not accept a lambda. You can, however, cast the lambda expression to a specific delegate signature (say Action), and then pass that to the method. The compiler cannot automatically do this for you, because there are many different delegate types that could be a valid match for the signature of the lambda … and the compiler has no way of knowing which would be the right one.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this code which does the trick: #include <stdio.h> int main() { int
I have this piece of code that does not work: public CartaoCidadao() { InitializeComponent();
I have this CSS style that does a rounded corners for div border, but
I have this email sending code that does not show a chooser (good). How
I have this method which does certain checks and applies a color code on
I have this simple redirection on my website and it does not rewrite my
i have this query but this shows column does not exist SELECT p.content, (select
Does ** have any special meaning in C? Like this: static intparse_one (int argc,
I have this scala application which is very simple . All that it does
I have this program, but cin in randomly skips.. I mean sometimes it does,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.