Click here to Skip to main content
15,919,178 members
Home / Discussions / C#
   

C#

 
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 
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 
Your assumptions are wrong. The compiler will turn this:

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


into this:

int tempInt = Threading.CurrentThread.GetHashCode();
string tempStr = string.Concat("Current thread is: ", tempInt.ToString());
System.Diagnostics.Debugger.Log(0,"", tempStr);


JoeRip wrote:
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()?
Reply·Email·View Thread·PermaLink·Bookmark


No, that is not possible with plain old methods. (It is possible with yield return iterator methods, but that's another story.)



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 
GeneralRe: Casting from a Base to Derived Class Pin
Wendelius17-Aug-08 10:17
mentorWendelius17-Aug-08 10:17 

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.