473,503 Members | 1,649 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Reflection possible on the call stack?

Is it possible to use reflection to get the name of methods on the call
stack as well as their supplied parameters and method signatures? Thanks in
advance.

Best wishes,
j^2
Nov 16 '05 #1
2 4217
On 03 Jul 2004 04:45, "J.J. Feminella" wrote:
Is it possible to use reflection to get the name of methods on the call
stack as well as their supplied parameters and method signatures? Thanks in
advance.

Best wishes,
j^2


Yoy can certainly get the call stack and the individual class and method
names. From there, you can use reflection to get MethodInfo (or similar)
information about each one of them. I don't believe that you can get the
values of any parameters, though, except for the current one.

--
Simon Smith
simon dot s at ghytred dot com
www.ghytred.com/NewsLook - NNTP Client for Outlook
Nov 16 '05 #2
On 03 Jul 2004 04:45, "J.J. Feminella" wrote:
Is it possible to use reflection to get the name of methods on the call
stack as well as their supplied parameters and method signatures? Thanks in
advance.

Best wishes,
j^2


Yoy can certainly get the call stack and the individual class and method
names. From there, you can use reflection to get MethodInfo (or similar)
information about each one of them. I don't believe that you can get the
values of any parameters, though, except for the current one.

--
Simon Smith
simon dot s at ghytred dot com
www.ghytred.com/NewsLook - NNTP Client for Outlook
Nov 16 '05 #3

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

Similar topics

2
323
by: djp | last post by:
Hi, I'm trying to access fields that are local to a method using reflection. What BindingFlags value should I use and is this possible at all. So far I was able to retreive class fields only. ...
1
1225
by: Good Enchiladas | last post by:
Is it possible to determine a method's own attributes from within the method without hardcoding the name of the method as a constant within the method? Please tell me if it is possible and how it...
0
276
by: J.J. Feminella | last post by:
Is it possible to use reflection to get the name of methods on the call stack as well as their supplied parameters and method signatures? Thanks in advance. Best wishes, j^2
2
4306
by: brianlanning | last post by:
I'm trying to write a function that can reliably know the name of the calling method. I've figured out how to do this: string methodname = (new StackTrace()).GetFrame(1).GetMethod().Name; ...
1
1989
by: Marco | last post by:
Hi all I am using .NET reflection to examine a stack trace, using the StackTrace, StackFrame, MethodInfo, ParameterInfo and FieldInfo classes. I can easily discover all methods in the call...
0
1140
by: Berger | last post by:
Hello I have a C# webservice which calls c# class dll´s using reflection. One class should produce pdf reports. All works fine. Now I have read that in the web.config the compilation debug...
10
4352
by: pedrito | last post by:
I have a library I'm using that has a lapsed listener issue. I figured I'd just sneak in and do the unsubscription myself since I don't expect it to be fixed any time soon. So, I have the...
1
1422
by: John | last post by:
I am trying to figure out how to translate the following CIL call into an Emit statement. In CIL it is: IL_004c: callvirt instance class System.Data.DataRow...
7
2663
by: =?Utf-8?B?UVNJRGV2ZWxvcGVy?= | last post by:
I have a C# logging assembly with a static constructor and methods that is called from another C# Assembly that is used as a COM interface for a VB6 Application. Ideally I need to build a file...
0
7198
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
7072
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...
0
7271
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7319
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
6979
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
5570
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
4998
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
3160
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
3149
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.