473,386 Members | 1,738 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,386 software developers and data experts.

do is possible to get the path of the method that is begin executed?

for example:

Namespace MyNamespace
Public Class MyClass
Public Sub mySub()

Console.WriteLine("Executing..." & MyCurrentSub())
' The MyCurrentSub is just an example of a pseudocode, that will
be replaced with the real function name
' or whatever I need to get the current Method, the output will
be: "Executing... MyNamespace.MyClass.mySub"

End Sub
End Class
End Namespace
Thanks
Jul 21 '05 #1
2 1173
David <ac*****@gmail.com> wrote:
for example:

Namespace MyNamespace
Public Class MyClass
Public Sub mySub()

Console.WriteLine("Executing..." & MyCurrentSub())
' The MyCurrentSub is just an example of a pseudocode, that will
be replaced with the real function name
' or whatever I need to get the current Method, the output will
be: "Executing... MyNamespace.MyClass.mySub"

End Sub
End Class
End Namespace


See MethodBase.GetCurrentMethod().

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
Jul 21 '05 #2
Thanks!!
"Jon Skeet [C# MVP]" <sk***@pobox.com> escribió en el mensaje
news:MP************************@msnews.microsoft.c om...
David <ac*****@gmail.com> wrote:
for example:

Namespace MyNamespace
Public Class MyClass
Public Sub mySub()

Console.WriteLine("Executing..." & MyCurrentSub())
' The MyCurrentSub is just an example of a pseudocode, that will be replaced with the real function name
' or whatever I need to get the current Method, the output will be: "Executing... MyNamespace.MyClass.mySub"

End Sub
End Class
End Namespace


See MethodBase.GetCurrentMethod().

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too

Jul 21 '05 #3

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

Similar topics

3
by: Jeff Wagner | last post by:
Is it possible to append a new Path to some file permanently? It seems like a sys.path.append('/my/new/path') statement is temporary. In other words, where and in what file on a Win32 box or...
11
by: Jim | last post by:
Hi, I keep getting form results emailed to me that would indicate a form from my web site is getting submitted with all fields blank or empty, but my code should preventing users from proceeding...
14
by: php newbie | last post by:
I am getting error messages when I try to delete from a table using the values in the table itself. The intent is to delete all rows from TableA where col_2 matches any of the col_1 values. ...
2
by: Garry Freemyer | last post by:
I wrote a screensaver, via Visual Studio 2003 in C# and I decided a wiser choice for me was to use an xml file to save my configs. Btw: I wonder if this is why every bit of documentation I've found...
2
by: David | last post by:
for example: Namespace MyNamespace Public Class MyClass Public Sub mySub() Console.WriteLine("Executing..." & MyCurrentSub()) ' The MyCurrentSub is just an example of a pseudocode, that will...
1
by: Billy | last post by:
Hi All, I'm attempting to use the MapNetworkDrive <snippedbelow from entire code below with very poor performance results. Basically, I have very small 73kb text files that are rewritten daily...
2
by: sujithvaddi | last post by:
Hello sir/madam, This is Sujith. I am working on an online form with user authentication page using ASP and using MS access database. So i am done and everything is ok when I am doing on my...
10
by: MLH | last post by:
Suppose, in a multi-user environment, you have append query SQL in a VBA procedure that looks like INSERT INTO MyTable... and the next line reads MyVar=DMax("","MyTable... You can never be...
10
by: Milan Krejci | last post by:
hello, sorry to bother you with this but i can't seem to figure out why i can't do: struct SD { int from; int to; } sd; std::map<sd,std::stringListOfWorkingSchedule;
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
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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: 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...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

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.