473,508 Members | 2,274 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Any method to return the current procedure name in VB.Net

Dear All,

Does anyone know hoe to get the current procedure name in Vb.Net ?

Example
Private Function TestingMe() as string
Return thisProcedureName
End Function

and the function can return "TestingMe"


Nov 22 '05 #1
3 9138
You can use Reflection:

MethodBase.GetCurrentMethod().Name

José

Jose
"Norton" <no********@hotmail.com> wrote in message
news:uW**************@TK2MSFTNGP09.phx.gbl...
Dear All,

Does anyone know hoe to get the current procedure name in Vb.Net ?

Example
Private Function TestingMe() as string
Return thisProcedureName
End Function

and the function can return "TestingMe"

Nov 22 '05 #2
that's great~

thx a lot ^^
"Jos?Joye" <jo*******@KILLTHESPAMSbluewin.ch> wrote in message
news:%2***************@TK2MSFTNGP11.phx.gbl...
You can use Reflection:

MethodBase.GetCurrentMethod().Name

Jos?

Jose
"Norton" <no********@hotmail.com> wrote in message
news:uW**************@TK2MSFTNGP09.phx.gbl...
Dear All,

Does anyone know hoe to get the current procedure name in Vb.Net ?

Example
Private Function TestingMe() as string
Return thisProcedureName
End Function

and the function can return "TestingMe"


Nov 22 '05 #3
you can use this method:

System.Reflection.MethodBase.GetCurrentMethod.Name ()

************************************************** ********************
Sent via Fuzzy Software @ http://www.fuzzysoftware.com/
Comprehensive, categorised, searchable collection of links to ASP & ASP.NET resources...
Nov 22 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
2175
by: John Bentley | last post by:
I have two tasks that I expect will be straight forward to anyone with reflection skills. 1. To return the the name of an object instance (not type) determined at run time. For example, I...
3
613
by: Norton | last post by:
Dear All, Does anyone know hoe to get the current procedure name in Vb.Net ? Example Private Function TestingMe() as string Return thisProcedureName End Function and the function can...
1
2373
by: Tony Wilkinson | last post by:
Hi, Does anyone know if it is possible to get the current procedure name from any function or code please. I have had many occassions to need this but have not been able to find a way of...
5
2980
by: Lyn | last post by:
Is there any way of determining in VBA the name and arguments of the currently executed procedure? To assist in debugging, I would like to be able to trace the procedures as they are executed. ...
1
3547
by: windandwaves | last post by:
Hi Folks In Google, I read: Jonathan Roenberg Mar 5 2001, 8:35 am Is there a way in VBA to find the name of the current procedure at run time? This would be very helpful for some error...
6
1252
by: Tor Inge Rislaa | last post by:
Finding current Procedure I want to write errors to a log-file, where the error log contain the description of where the error occurred and what kind of error it was. Private Sub...
1
972
by: roddles | last post by:
Hi I need to at runtime determine the name of the function I am currently in, and the namespace of the class the function is executing from. I need this information for some logging routines i am...
6
2589
by: Ronchese | last post by:
Hello, is there any way to get the name of the current running procedure? For example: Public Sub Test( ) 'do something '...
13
9154
by: Neil | last post by:
Can I get the name of a procedure from within the procedure? In my error handler, I write the error to an error table. I'd like to write the name of the procedure that's writing the error. But,...
4
7128
by: Jonathan | last post by:
I have a SQL stored procedure for adding a new record in a transactions table. It also has two return values: CounterID and IDKey. I want to create a webservice that accepts the 10 input...
0
7398
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
7061
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
5637
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5057
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4716
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3208
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3194
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1566
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
769
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.