Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

In code, is there a way to reference the name of the sub or function you are in? When an error messages is shown (using ex.ToString) it lists the various subs, so it knows the names, so I'm wondering if that's accessible to Visual Studio 2005 VB.NET code as well. Example...

 

Private Sub ProcessInvoices()

End Sub

 

In this sub, it is possible to refer to the name "ProcessInvoices"? (So if the sub name ever changes, then every place I refer to the sub name, it will automatically be the same?)

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...