Hello Largo,
Thanks for posting in the group.
I suggest you try StackTrace.GetFrame to get a STackFrame object and then
use its GetFileLineNumber and GetMethod function to get the info. This
series of classes are used to get a stack trace info of running application.
Did it answer your question? Please post here if you have follow up
questions.
Best regards,
Yanhong Huang
Microsoft Online Partner Support
Get Secure! -
www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
!From: "Largo SQL Tools" <
[email protected]>
!Subject: Reflection Question (?)
!Date: Fri, 5 Sep 2003 21:41:56 -0400
!Lines: 14
!X-Priority: 3
!X-MSMail-Priority: Normal
!X-Newsreader: Microsoft Outlook Express 6.00.2600.0000
!X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
!Message-ID: <
[email protected]>
!Newsgroups:
microsoft.public.dotnet.framework,microsoft.public.dotnet.languages.csharp
!NNTP-Posting-Host: cblmdm65-221-37-137.buckeye-express.com 65.221.37.137
!Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP09.phx.gbl
!Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.languages.csharp:182782
microsoft.public.dotnet.framework:53088
!X-Tomcat-NG: microsoft.public.dotnet.framework
!
!I would like some way to determine every place in my solution where a given
!method of a given class is called (not defined). Preferably I would like
to
!know the source file name and line number of each method call. Is this
!possible using reflection or some other method?
!
!Thanks very much.
!
!J.R.
!Largo SQL Tools
!The Finest Collection of SQL Tools Available
!
http://www.largosqltools.com
!
!
!
!