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

  • Home
  • SEARCH
  • 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 792779
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T22:02:45+00:00 2026-05-14T22:02:45+00:00

Working with a fairly large VB.Net back office winforms application. 1 million+ LOC. Big

  • 0

Working with a fairly large VB.Net back office winforms application. 1 million+ LOC.
Big ball of mud, 90% of all code is in Forms & other UI controls.

Slowly introducing better architecture as time & recources allows, We’ve been using ideas from the EventAggrgator by Jeremy Miller.

http://codebetter.com/blogs/jeremy.miller/archive/2008/01/11/build-your-own-cab-extensible-pub-sub-event-aggregator-with-generics.aspx

Initially I stripped out the usage of SynchronizationContext. Now I’m trying to introduce it back, and I’m struggling with the translation of the lamda stuff from c# to vb.net.

Specifically this line of c#

_context.Send(delegate { receiver.Handle(subject); }, null);

This is the vb.net I have so far:

_context.Send(New SendOrPostCallback(AddressOf listener.Handle(message)), Nothing)

The error I’m getting is

listener.Handle(message) <– AddressOf operand must be the name of a method.

I’m sure I’m missing something simple, but after staring at this for 2 days, I’m lost.

  • 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-14T22:02:46+00:00Added an answer on May 14, 2026 at 10:02 pm

    Try the following

    _context.Send(New SendOrPostCallback(AddressOf listener.Handle), message)
    

    The problem is you’re trying to translate C# delegates which aren’t supported in VB until VB9. This style of delegate, void returning, is not actually supported until VB10.

    The best translation is to use straight delegates instead. Depending on the signature the above should work. if not, please post the signature for listener.Handle so we can give a better answer.

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

Sidebar

Related Questions

I am working in Java on a fairly large project. My question is about
I have to develop a fairly large ASP.NET MVC project very quickly and I
I am working on a fairly large aspx web project with extensive use of
I'm thinking about starting work on a fairly large scale .NET or ASP.NET project
I'm working on a fairly large project for a trading company in Philadelphia. The
After working with a lot of GD recently (for some fairly large scale projects
I'm working on a fairly complex project, a custom encryption routine if you will
I've started working on a fairly complicated software. It is for a personal project,
I am fairly comfortable with standalone Java app development, but will soon be working
I am working on a number of websites with files dating back to 2000.

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.