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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T15:55:50+00:00 2026-05-14T15:55:50+00:00

I wonder if someone can help me. I’ve got a console App which I

  • 0

I wonder if someone can help me. I’ve got a console App which I use to debug various components as I develop them.

I’d like to be able to log to the console every time an event is fired either in the object I’ve instantiated or in anything it’s instantiated [ad infinitum]. I wouldn’t see some of these events normally due to them being consumed further down the chain). Ideally I would be able to log all public and private events but if only public are possible, I can live with that.

I’ve Googled and all I can find is how to monitor a directory – So I’m not sure if this is not possible or simply has a name that I don’t know.

The sort of information I’m after is similar to what’s found in an exception – Target Site, Source, Stack Trace, etc…

Could I perhaps do this through reflection somehow?

If someone could tell me if this is even possible and perhaps point me at some good resources, I’d be very grateful.

Many thanks

Basic

To Give you an idea of the console App:

Sub Main()
    Container = ContainerGenerate.GenerateContainer()
    Dim TemplateID As New Guid("5959b961-b347-46bc-b1b6-cba311304f43")
    Dim Templater = Container.Resolve(Of Interfaces.Mail.IMailGenerator)()
    Dim MyMessage = Templater.GenerateMail(TemplateID, Nothing, Nothing)
    Dim MySMTPClient = Container.Resolve(Of SmtpClient)()
    MySMTPClient.Send(MyMessage)
    Finish()
End Sub
  • 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-14T15:55:51+00:00Added an answer on May 14, 2026 at 3:55 pm

    There is nothing built in to the Framework that would allow you to do this. It is possible using reflection, although I’m not sure I would recommend it. The following code shows you to get the list of all members of a type:

      Try
         Dim myObject As New [MyClass]()
         Dim myMemberInfo() As MemberInfo
    
         ' Get the type of 'MyClass'.
         Dim myType As Type = myObject.GetType()
    
         ' Get the information related to all public member's of 'MyClass'. 
         myMemberInfo = myType.GetMembers()
    
         Console.WriteLine(ControlChars.Cr + "The members of class '{0}' are :" + ControlChars.Cr, myType)
         Dim i As Integer
         For i = 0 To myMemberInfo.Length - 1
            ' Display name and type of the concerned member.
            Console.WriteLine("'{0}' is a {1}", myMemberInfo(i).Name, myMemberInfo(i).MemberType)
         Next i
    
      Catch e As SecurityException
         Console.WriteLine(("Exception : " + e.Message.ToString()))
      End Try
    

    In the loop, you would need to determine if the member is an event, and if so, hook an event handler to it.

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

Sidebar

Related Questions

I wonder if someone can help me - I've got a label which I
I wonder if someone can help me; In PHP you can use fopen(Path) to
wonder whether someone can help me with the following one... I have a struct
I wonder if someone can help me. I want to replicate the following SQL
I wonder if someone can help me. I'm trying to add a reference to
I wonder if someone can help me. I'm trying to display a toast element
I wonder if someone can help: Long story short, I'm using MSSQL2005 to build
I wonder if someone can help me - I've been programming VB.Net for a
I wonder if someone can help shed some light on this: I drop a
I wonder if someone can help me out with regards to the memory management

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.