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 210967
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T18:03:11+00:00 2026-05-11T18:03:11+00:00

I think know how to do this in C# but I’m having syntax trouble

  • 0

I think know how to do this in C# but I’m having syntax trouble in VB.NET because I need to take advantage of the ‘handles’ event stuff.

I have different events that I somehow (probably delegate) need stored in a property of an attribute (I just add an attribute to a property linking to the corresponding event).

E.g.

<BindEvent(EventThing)>_
Public ReadOnly Property IsTrue() As Boolean
  Get
    Return True
  End Get
End Property

They need to be events so that other programmers can use the VB.NET handles keyword on methods.

Public Delegate Sub TestEvent(ByVal sender As Object, ByVal e As Object)
Public Event E As TestEvent

Public Sub Test() Handles E
End Sub

These properties are already raising a general event, which I am catching, determining the related property and thus getting the related attribute (and delegate/event). I want to then raise the event that’s related.

If I just use a delegate tied to the particular event that won’t raise other handlers will it?

I also want to avoid having to write a sub for each property that just uses Raise Event on the event type if possible as this seems redundant.

e.g. avoid:

Public Event E As TestEvent
Public Sub CallE(ByVal sender As Object, ByVal e As Object)
  RaiseEvent E(sender, e)
End Sub
<BindDelegate(DelegateToCallE)>_
Public ReadOnly Property IsTrue() As Boolean
  Get
    Return True
  End Get
End Property
  • 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-11T18:03:11+00:00Added an answer on May 11, 2026 at 6:03 pm
    Public Class foo
    
        Public Event TestEvent()
    
    End Class
    
    
    Public Class bar
        Dim WithEvents x As New foo
        Public Sub HandleEvent() Handles x.TestEvent
        End Sub
    End Class
    

    Is this what you are looking for?

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

Sidebar

Ask A Question

Stats

  • Questions 150k
  • Answers 150k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer string.Format is your friend. String.Format("{0:0.00}", 123.4567); // "123.46" May 12, 2026 at 9:46 am
  • Editorial Team
    Editorial Team added an answer have you tried using jQuery.post()? I think $.ajax is used… May 12, 2026 at 9:46 am
  • Editorial Team
    Editorial Team added an answer It appears this is a known bug with the ListBox… May 12, 2026 at 9:46 am

Related Questions

I think know how to do this in C# but I'm having syntax trouble
I have an exercise to do where I need to code in C, commands
I'm trying to learn myself some C++ from scratch at the moment. I'm well-versed
I'm starting to use objective C, and objective C mode works perfectly fine. However,
Specifically, I need to validate the incoming X.509 security certificate against a database to

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.