System.Diagnostics.StackTrace compact framework

I am trying to get the line number and the name of the exception file when it loads for my application built on the .net Compact Framework. I know that StackTrace objects were excluded from .netCF, but I wonder if there is an alternative. A google search only raised issues back in 2005 or earlier, so I wonder if there have been any improvements over the last 6 years.

Thanks!

+4
source share
2 answers

The line number and file name are not available in the Compact Framework stack trace in versions 1.0, 2.0, or 3.5. Not sure about 3.7 (the basics of the phone), but I doubt it is there.

+5
source

StackTrace is only available from an abandoned exception (and only from .NETCF 2.0 and later). In addition, you can view the stack on the screen using the Debug.Fail dialog.

I believe that if you find nothing, just assume that nothing new has been done since.

In any case, if you need to access the stack trace from the catch block, you have an exception object, so it should be fine ...

0
source

Source: https://habr.com/ru/post/1339695/


All Articles