Click here to Skip to main content
15,905,028 members
Home / Discussions / C#
   

C#

 
AnswerRe: Parsing Nullable DateTime Pin
Guffa17-Aug-08 21:03
Guffa17-Aug-08 21:03 
GeneralRe: Parsing Nullable DateTime Pin
N a v a n e e t h17-Aug-08 21:05
N a v a n e e t h17-Aug-08 21:05 
GeneralRe: Parsing Nullable DateTime Pin
benjymous17-Aug-08 23:57
benjymous17-Aug-08 23:57 
GeneralRe: Parsing Nullable DateTime Pin
Guffa18-Aug-08 2:42
Guffa18-Aug-08 2:42 
QuestionRename xml file name in C# [Resolved] Pin
CodingLover17-Aug-08 18:24
CodingLover17-Aug-08 18:24 
AnswerRe: Rename xml file name in C# Pin
CodingLover17-Aug-08 19:00
CodingLover17-Aug-08 19:00 
QuestionC# CodeDom CodeMethodInvokeExpression Class Pin
AndieDu17-Aug-08 16:27
AndieDu17-Aug-08 16:27 
QuestionDoes a method execute on the same thread for its entire length? Pin
JoeRip17-Aug-08 14:07
JoeRip17-Aug-08 14:07 
I'm logging what thread my event handler is running on. My original log statement looks like this:

public void myEventHandler()
{
     AnotherMethodWhereWorkIsDone(data);

     System.Diagnostics.Debugger.Log(0,"", "Current thread is: " + Threading.CurrentThread.GetHashCode());

}


However, it occurs to me that this will actually report the thread that Debugger.Log is running on, and not that of my handler.

So then I snapshotted the CurrentThread.GetHashCode() at the top of my method.

public void myEventHandler()
{
     int currHashCode = Threading.CurrentThread.GetHashCode();

     AnotherMethodWhereWorkIsDone(data);

     System.Diagnostics.Debugger.Log(0,"", "Current thread is: " + currHashCode);

}


But now it occurs to me that I have no idea if my method is guaranteed to be executing on the same thread all the way through. Is there some chance that after AnotherMethodWhereWorkIsDone() executes, my handler will be running on a different thread than when I shapshotted it above AnotherMethodWhereWorkIsDone()?
AnswerRe: Does a method execute on the same thread for its entire length? Pin
Judah Gabriel Himango17-Aug-08 14:28
sponsorJudah Gabriel Himango17-Aug-08 14:28 
GeneralRe: Does a method execute on the same thread for its entire length? Pin
JoeRip17-Aug-08 14:32
JoeRip17-Aug-08 14:32 
Questionplaying rmvb videos using csharp.net Pin
zumty17-Aug-08 13:44
zumty17-Aug-08 13:44 
AnswerRe: playing rmvb videos using csharp.net Pin
DeepToot17-Aug-08 13:56
DeepToot17-Aug-08 13:56 
GeneralRe: playing rmvb videos using csharp.net Pin
zumty17-Aug-08 20:48
zumty17-Aug-08 20:48 
QuestionNeed advice on light weight database-like design Pin
DeepToot17-Aug-08 13:37
DeepToot17-Aug-08 13:37 
AnswerRe: Need advice on light weight database-like design Pin
N a v a n e e t h17-Aug-08 19:40
N a v a n e e t h17-Aug-08 19:40 
QuestionCheck if form is open? Pin
Arcdigital17-Aug-08 11:37
Arcdigital17-Aug-08 11:37 
AnswerRe: Check if form is open? Pin
lisan_al_ghaib17-Aug-08 12:37
lisan_al_ghaib17-Aug-08 12:37 
AnswerRe: Check if form is open? another way Pin
Natza Mitzi17-Aug-08 13:45
Natza Mitzi17-Aug-08 13:45 
QuestionCasting from a Base to Derived Class Pin
Jammer17-Aug-08 8:21
Jammer17-Aug-08 8:21 
AnswerRe: Casting from a Base to Derived Class Pin
Pete O'Hanlon17-Aug-08 8:34
mvePete O'Hanlon17-Aug-08 8:34 
AnswerRe: Casting from a Base to Derived Class Pin
Wendelius17-Aug-08 8:37
mentorWendelius17-Aug-08 8:37 
GeneralRe: Casting from a Base to Derived Class Pin
Jammer17-Aug-08 9:25
Jammer17-Aug-08 9:25 
GeneralRe: Casting from a Base to Derived Class Pin
Jammer17-Aug-08 9:30
Jammer17-Aug-08 9:30 
GeneralRe: Casting from a Base to Derived Class Pin
Wendelius17-Aug-08 9:52
mentorWendelius17-Aug-08 9:52 
GeneralRe: Casting from a Base to Derived Class Pin
Jammer17-Aug-08 10:15
Jammer17-Aug-08 10:15 

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.