Click here to Skip to main content
15,904,024 members
Home / Discussions / C#
   

C#

 
QuestionMessage Removed Pin
5-Oct-14 2:36
fatemehsoleimani5-Oct-14 2:36 
QuestionSystem.NullReferenceException DataGrid WPF Pin
smgetaweh4-Oct-14 6:18
smgetaweh4-Oct-14 6:18 
AnswerRe: System.NullReferenceException DataGrid WPF Pin
Dave Kreskowiak4-Oct-14 7:22
mveDave Kreskowiak4-Oct-14 7:22 
GeneralRe: System.NullReferenceException DataGrid WPF Pin
smgetaweh4-Oct-14 7:40
smgetaweh4-Oct-14 7:40 
GeneralRe: System.NullReferenceException DataGrid WPF Pin
SledgeHammer014-Oct-14 8:57
SledgeHammer014-Oct-14 8:57 
AnswerRe: System.NullReferenceException DataGrid WPF Pin
Praneet Nadkar5-Oct-14 19:58
Praneet Nadkar5-Oct-14 19:58 
GeneralRe: System.NullReferenceException DataGrid WPF Pin
smgetaweh6-Oct-14 4:44
smgetaweh6-Oct-14 4:44 
QuestionDisabling a Row of Data Grid View on Send Mail Button click Pin
AMRITESH ASTHANA3-Oct-14 20:40
AMRITESH ASTHANA3-Oct-14 20:40 
AnswerRe: Disabling a Row of Data Grid View on Send Mail Button click Pin
Richard MacCutchan3-Oct-14 21:40
mveRichard MacCutchan3-Oct-14 21:40 
GeneralRe: Disabling a Row of Data Grid View on Send Mail Button click Pin
AMRITESH ASTHANA6-Oct-14 2:46
AMRITESH ASTHANA6-Oct-14 2:46 
QuestionAny fast way to get the stack trace? Pin
SledgeHammer013-Oct-14 15:59
SledgeHammer013-Oct-14 15:59 
AnswerRe: Any fast way to get the stack trace? Pin
fengyuancom3-Oct-14 18:13
fengyuancom3-Oct-14 18:13 
AnswerRe: Any fast way to get the stack trace? Pin
Pete O'Hanlon4-Oct-14 0:55
mvePete O'Hanlon4-Oct-14 0:55 
AnswerRe: Any fast way to get the stack trace? Pin
Dave Kreskowiak4-Oct-14 3:36
mveDave Kreskowiak4-Oct-14 3:36 
GeneralRe: Any fast way to get the stack trace? Pin
SledgeHammer014-Oct-14 6:02
SledgeHammer014-Oct-14 6:02 
GeneralRe: Any fast way to get the stack trace? Pin
Dave Kreskowiak4-Oct-14 7:17
mveDave Kreskowiak4-Oct-14 7:17 
GeneralRe: Any fast way to get the stack trace? Pin
SledgeHammer014-Oct-14 12:36
SledgeHammer014-Oct-14 12:36 
GeneralRe: Any fast way to get the stack trace? Pin
Dave Kreskowiak4-Oct-14 12:42
mveDave Kreskowiak4-Oct-14 12:42 
GeneralRe: Any fast way to get the stack trace? Pin
SledgeHammer014-Oct-14 14:08
SledgeHammer014-Oct-14 14:08 
Dave Kreskowiak wrote:
Uhhhh....yeah. Whatever.


No need for rudeness dude. I think you're just very confused. In my previous response, I **AGREED** with you and said you *probably* aren't going to get a high volume of log calls requesting a stack trace. As I said, my logger is configurable. You don't have to request a stack trace, but you *CAN*. Or you can log stuff *WITHOUT* requesting a stack trace. Not every log entry will want a stack trace. For example, with my request log at work, I certainly don't want a stack trace, but I do want one in my exception log. The exception log doesn't have a million rows as I **AGREED** with you in my last response, it has a much lower volume.

As artificial intelligence has not yet been perfect, how would you suggest a logger component know which log entry will need a stack trace? Yes, I can add a bool to the logger call, or I can make it a bit more automated as I plan to do. Although a bool in the logger call would give the user much more control then the automated detection method.

Dave Kreskowiak wrote:
Think about that for a minute. What are you going to get in the stack trace? A million examinations of the call to the log component!


UHHH... HUH?

You don't just pull log entries out of your ass, man. You log stuff in specific locations. For my request log, I log the request at the entry point of the service. For my exception log, I log stuff in exception handlers. If you've ever used an exception handler, you should know full and well that you get the stack trace of the **actual exception** and not the call into the logger.

Like wise, if I put a logger call in SomeClass.SomeMethod() you don't get the call stack of the call into the logger component, you get the call stack of the call into SomeClass.SomeMethod(). That's why its called a STACK dude. Its recursive.

Speaking of the call into the logger, do you think I'm an idiot or something? Why would a user want to see the call stack of the logger? They would **NOT**. So I skip over those frames. **Just like every other logger on the market does**.

Dave Kreskowiak wrote:
You're basically not going to get what you would call a "high performance" stack trace. The operation is just too expensive.


If you knew at all how stack traces work, you'd know that a stack trace is actually quite fast. Its the file & line info that's slow since you need to parse that out of the PDB file.

Hey, have you ever used the StackTrace class? Did you notice Microsoft put a bool on there to specify if you want the file & line info or not? Did you think that bool was put in there for your amusement? It was actually put in there because obtaining the file & line info is the majority of the time spent on the stack trace.

Anyways... thanks for your useful feedback, I think I've got what I need.
GeneralRe: Any fast way to get the stack trace? Pin
Dave Kreskowiak4-Oct-14 18:52
mveDave Kreskowiak4-Oct-14 18:52 
QuestionTextarea not able insert large text Pin
sreekanth.jonna3-Oct-14 10:48
sreekanth.jonna3-Oct-14 10:48 
SuggestionRe: Textarea not able insert large text Pin
George Jonsson5-Oct-14 15:04
professionalGeorge Jonsson5-Oct-14 15:04 
QuestionNeed to send an email 20 minutes before the event time Pin
VladFromNYC3-Oct-14 9:48
VladFromNYC3-Oct-14 9:48 
AnswerRe: Need to send an email 20 minutes before the event time Pin
BillWoodruff3-Oct-14 10:58
professionalBillWoodruff3-Oct-14 10:58 
GeneralRe: Need to send an email 20 minutes before the event time Pin
VladFromNYC3-Oct-14 11:30
VladFromNYC3-Oct-14 11:30 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.