473,385 Members | 1,409 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

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 9131
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
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
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
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
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
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
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
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
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
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
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...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.