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

Paragraph Name

Hello, I was wondering if there is some way I can obtain the name of the
subroutine that a line of code is executing in via the code.

Sy for example you wanted to write a message like the following:

Trace.Write("ProcessStart", "Starting in Subroutine 'MySubroutine'"

Is there a way for me to programmatically get the name of the subroutine in
which this line of code is executing such that I do not have to hard code
the information everytime?

Thanks in advance for your assistance!!!!!!
Nov 18 '05 #1
2 1039
Have you tried using the GetMethod method in
System.Diagnostics.StackFrame?

Bruce Johnson
http://www.ObjectSharp.com/Bruce
-----Original Message-----
Hello, I was wondering if there is some way I can obtain the name of thesubroutine that a line of code is executing in via the code.
Sy for example you wanted to write a message like the following:
Trace.Write("ProcessStart", "Starting in Subroutine 'MySubroutine'"
Is there a way for me to programmatically get the name of the subroutine inwhich this line of code is executing such that I do not have to hard codethe information everytime?

Thanks in advance for your assistance!!!!!!
.

Nov 18 '05 #2
thanks
Nov 18 '05 #3

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

Similar topics

2
by: Kevin Blount | last post by:
I have a string of HTML (used for a specific purpose) that I'd like to use somewhere else but as plain text. Rather than introduce a specifically created plain text version I'd like to strip the...
2
by: ThunStorm | last post by:
I have a script that is working but I can't figure out how to add paragraph breaks into the textarea. Can anyone help me? If you run the script, the problem will be easier to understand. If...
1
by: Jean-François Michaud | last post by:
Hello people, I was wondering how it I could implement keep with next logic on lines of text contained within a paragraph. I need to have at least 10 lines of text within a paragraph to be...
1
by: abhas59 | last post by:
hi friends, I want to serialize a System.Windows.Documents.Paragraph and for this I have written the following code in the application : mypara cust = new mypara(); Paragraph ph...
15
by: Yogi | last post by:
Hi there, I have a quick question. In my html document, I want to make a new paragraph whenever I have a blank line in the html source. Using <p> and </pevery time is kind of cumbersome (I want...
14
by: wshaer | last post by:
Hi all, I have an assignment and I need some help with it. This is the assignment // Research reports are often required to conform to a given standard such as APA or MLA. These standards...
1
by: can2564 | last post by:
Help I found some code for scrolling images and now want to have a paragraph below each image that changes with each image... But not sure how. This is the scrolling code I'm using and it works,...
3
by: gentsquash | last post by:
I'm trying to display a paragraph that has a centered phrase, such as this one, in the middle of the paragraph. An example is the section "End of semester project" on my course-page ...
6
by: Haines Brown | last post by:
I'm trying to resolve a contradictory situation in which I have rows going down a page, and each consists of two elements: to the left is a thumbnail image that is a hot link; to its right is a...
2
by: uamusa | last post by:
I am Dynamically generating a proposal(report) in MS Word. By default the Paragraph Alignment is "Left". For the First 6 Paragraphs I set the Alignment to "Center", and then when attempting to...
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
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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
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...

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.