Click here to Skip to main content
15,500,218 members
Home / Discussions / C#
   

C#

 
AnswerRe: DragDrop to a native window? Pin
Heath Stewart13-Jan-04 6:07
protectorHeath Stewart13-Jan-04 6:07 
GeneralRe: DragDrop to a native window? Pin
TuringTest113-Jan-04 6:55
MemberTuringTest113-Jan-04 6:55 
Generalasking for system tray application Pin
azusakt12-Jan-04 17:25
Memberazusakt12-Jan-04 17:25 
GeneralRe: asking for system tray application Pin
Jeff Mackie12-Jan-04 18:16
sussJeff Mackie12-Jan-04 18:16 
GeneralRe: asking for system tray application Pin
azusakt12-Jan-04 18:51
Memberazusakt12-Jan-04 18:51 
GeneralRe: asking for system tray application Pin
Heath Stewart13-Jan-04 5:53
protectorHeath Stewart13-Jan-04 5:53 
Questionreturning when inside a lock - is it safe? Pin
Brandon Haase12-Jan-04 16:29
MemberBrandon Haase12-Jan-04 16:29 
AnswerRe: returning when inside a lock - is it safe? Pin
Heath Stewart13-Jan-04 5:46
protectorHeath Stewart13-Jan-04 5:46 
It's completely safe. The lock keyword translates to the following (verifiable if you use ildasm.exe or some other disassembler / decompiler to view the compiled code):
Monitor.Enter(syncRoot);
try
{
  // Do stuff
}
finally
{
  Monitor.Exit(syncRoot);
}
The finally block is always run - regardless of a return or a throw - except when Environment.Exit is called (which unloads the process and the CLR completely, thus it really won't matter that the lock wasn't released because the OS will reclaim any process resources).

 

-----BEGIN GEEK CODE BLOCK-----
Version: 3.21
GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++
-----END GEEK CODE BLOCK-----
GeneralRe: returning when inside a lock - is it safe? Pin
Brandon Haase13-Jan-04 17:13
MemberBrandon Haase13-Jan-04 17:13 
AnswerRe: returning when inside a lock - is it safe? Pin
scadaguy13-Jan-04 6:23
Memberscadaguy13-Jan-04 6:23 
GeneralRe: returning when inside a lock - is it safe? Pin
Brandon Haase13-Jan-04 17:28
MemberBrandon Haase13-Jan-04 17:28 
Generalremoting access Pin
haih12-Jan-04 16:23
Memberhaih12-Jan-04 16:23 
GeneralRe: remoting access Pin
Heath Stewart13-Jan-04 5:31
protectorHeath Stewart13-Jan-04 5:31 
GeneralHelp with MonthCalendar class Pin
KingTermite12-Jan-04 16:18
MemberKingTermite12-Jan-04 16:18 
GeneralRe: Help with MonthCalendar class Pin
Heath Stewart13-Jan-04 4:41
protectorHeath Stewart13-Jan-04 4:41 
GeneralRe: Help with MonthCalendar class Pin
KingTermite13-Jan-04 5:27
MemberKingTermite13-Jan-04 5:27 
GeneralRe: Help with MonthCalendar class Pin
Heath Stewart13-Jan-04 5:37
protectorHeath Stewart13-Jan-04 5:37 
GeneralRe: Help with MonthCalendar class Pin
KingTermite13-Jan-04 6:43
MemberKingTermite13-Jan-04 6:43 
GeneralRe: Help with MonthCalendar class Pin
Heath Stewart13-Jan-04 6:50
protectorHeath Stewart13-Jan-04 6:50 
GeneralRe: Help with MonthCalendar class Pin
KingTermite13-Jan-04 7:02
MemberKingTermite13-Jan-04 7:02 
GeneralRe: Help with MonthCalendar class Pin
Heath Stewart13-Jan-04 7:47
protectorHeath Stewart13-Jan-04 7:47 
GeneralRe: Help with MonthCalendar class Pin
KingTermite15-Jan-04 15:49
MemberKingTermite15-Jan-04 15:49 
GeneralRe: Help with MonthCalendar class Pin
Heath Stewart16-Jan-04 4:42
protectorHeath Stewart16-Jan-04 4:42 
GeneralFile Permissions Pin
krisp12-Jan-04 15:54
Memberkrisp12-Jan-04 15:54 
GeneralRe: File Permissions Pin
Jeff Mackie12-Jan-04 18:33
sussJeff Mackie12-Jan-04 18:33 

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.