Click here to Skip to main content
15,846,006 members
Home / Discussions / C#
   

C#

 
AnswerRe: Parsing Nullable DateTime Pin
Guffa17-Aug-08 22:03
Guffa17-Aug-08 22:03 
GeneralRe: Parsing Nullable DateTime Pin
N a v a n e e t h17-Aug-08 22:05
N a v a n e e t h17-Aug-08 22:05 
GeneralRe: Parsing Nullable DateTime Pin
benjymous18-Aug-08 0:57
benjymous18-Aug-08 0:57 
GeneralRe: Parsing Nullable DateTime Pin
Guffa18-Aug-08 3:42
Guffa18-Aug-08 3:42 
QuestionRename xml file name in C# [Resolved] Pin
CodingLover17-Aug-08 19:24
CodingLover17-Aug-08 19:24 
AnswerRe: Rename xml file name in C# Pin
CodingLover17-Aug-08 20:00
CodingLover17-Aug-08 20:00 
QuestionC# CodeDom CodeMethodInvokeExpression Class Pin
AndieDu17-Aug-08 17:27
AndieDu17-Aug-08 17:27 
QuestionDoes a method execute on the same thread for its entire length? Pin
JoeRip17-Aug-08 15:07
JoeRip17-Aug-08 15: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 15:28
sponsorJudah Gabriel Himango17-Aug-08 15:28 
GeneralRe: Does a method execute on the same thread for its entire length? Pin
JoeRip17-Aug-08 15:32
JoeRip17-Aug-08 15:32 
Questionplaying rmvb videos using csharp.net Pin
zumty17-Aug-08 14:44
zumty17-Aug-08 14:44 
AnswerRe: playing rmvb videos using csharp.net Pin
DeepToot17-Aug-08 14:56
DeepToot17-Aug-08 14:56 
GeneralRe: playing rmvb videos using csharp.net Pin
zumty17-Aug-08 21:48
zumty17-Aug-08 21:48 
QuestionNeed advice on light weight database-like design Pin
DeepToot17-Aug-08 14:37
DeepToot17-Aug-08 14:37 
AnswerRe: Need advice on light weight database-like design Pin
N a v a n e e t h17-Aug-08 20:40
N a v a n e e t h17-Aug-08 20:40 
QuestionCheck if form is open? Pin
Arcdigital17-Aug-08 12:37
Arcdigital17-Aug-08 12:37 
AnswerRe: Check if form is open? Pin
lisan_al_ghaib17-Aug-08 13:37
lisan_al_ghaib17-Aug-08 13:37 
AnswerRe: Check if form is open? another way Pin
Natza Mitzi17-Aug-08 14:45
Natza Mitzi17-Aug-08 14:45 
QuestionCasting from a Base to Derived Class Pin
Jammer17-Aug-08 9:21
Jammer17-Aug-08 9:21 
AnswerRe: Casting from a Base to Derived Class Pin
Pete O'Hanlon17-Aug-08 9:34
subeditorPete O'Hanlon17-Aug-08 9:34 
AnswerRe: Casting from a Base to Derived Class Pin
Wendelius17-Aug-08 9:37
mentorWendelius17-Aug-08 9:37 
GeneralRe: Casting from a Base to Derived Class Pin
Jammer17-Aug-08 10:25
Jammer17-Aug-08 10:25 
GeneralRe: Casting from a Base to Derived Class Pin
Jammer17-Aug-08 10:30
Jammer17-Aug-08 10:30 
GeneralRe: Casting from a Base to Derived Class Pin
Wendelius17-Aug-08 10:52
mentorWendelius17-Aug-08 10:52 
GeneralRe: Casting from a Base to Derived Class Pin
Jammer17-Aug-08 11:15
Jammer17-Aug-08 11: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.