Click here to Skip to main content
16,006,475 members
Home / Discussions / C#
   

C#

 
GeneralRe: Reading all IP add in Local network Pin
leppie18-Apr-04 0:49
leppie18-Apr-04 0:49 
GeneralRe: Reading all IP add in Local network Pin
Anonymous18-Apr-04 3:11
Anonymous18-Apr-04 3:11 
GeneralRe: Reading all IP add in Local network Pin
Dave Kreskowiak18-Apr-04 4:47
mveDave Kreskowiak18-Apr-04 4:47 
Generallocking problem in continous insert Pin
dabuskol17-Apr-04 22:19
dabuskol17-Apr-04 22:19 
GeneralRe: locking problem in continous insert Pin
leppie17-Apr-04 22:59
leppie17-Apr-04 22:59 
GeneralRe: locking problem in continous insert Pin
Heath Stewart19-Apr-04 2:51
protectorHeath Stewart19-Apr-04 2:51 
GeneralRe: locking problem in continous insert Pin
dabuskol19-Apr-04 18:58
dabuskol19-Apr-04 18:58 
GeneralRe: locking problem in continous insert Pin
Heath Stewart20-Apr-04 3:21
protectorHeath Stewart20-Apr-04 3:21 
Yes, I do have a comment: you aren't using the Monitor correctly. If an exception is thrown, your Monitor is never signalled and your app will handle on the next request to lock the monitor!

Instead, use the lock statement like so:
lock (DBConnect)
{
  // Rest goes here...
}
...which, FYI, gets compiled as:
Monitor.Enter(DBConnect);
try
{
  // Rest goes here...
}
finally
{
  Monitor.Exit(DBConnect);
}
See the difference? If an exception occurs, no matter what the monitor is signalled and any exception is either handled within any nested catch blocks, or is passed up the caller stack.

 

Microsoft MVP, Visual C#
My Articles
Questionhow to convert HANDLE type in C#??? Pin
Paolo Ponzano17-Apr-04 21:04
Paolo Ponzano17-Apr-04 21:04 
AnswerRe: how to convert HANDLE type in C#??? Pin
leppie17-Apr-04 21:09
leppie17-Apr-04 21:09 
GeneralRe: how to convert HANDLE type in C#??? Pin
Paolo Ponzano17-Apr-04 21:27
Paolo Ponzano17-Apr-04 21:27 
GeneralSetup project problem Pin
Small Rat17-Apr-04 9:28
Small Rat17-Apr-04 9:28 
GeneralRe: Setup project problem Pin
Mazdak17-Apr-04 23:08
Mazdak17-Apr-04 23:08 
GeneralRe: Setup project problem Pin
Mazdak17-Apr-04 23:40
Mazdak17-Apr-04 23:40 
GeneralRe: Setup project problem Pin
Small Rat18-Apr-04 17:15
Small Rat18-Apr-04 17:15 
GeneralRe: Setup project problem Pin
Heath Stewart19-Apr-04 2:58
protectorHeath Stewart19-Apr-04 2:58 
GeneralC# Custom control property options Pin
mattd8917-Apr-04 8:00
mattd8917-Apr-04 8:00 
GeneralRe: C# Custom control property options Pin
leppie17-Apr-04 21:13
leppie17-Apr-04 21:13 
GeneralReading the serial number Pin
Amirjalaly17-Apr-04 7:27
Amirjalaly17-Apr-04 7:27 
GeneralRe: Reading the serial number Pin
Mazdak17-Apr-04 8:36
Mazdak17-Apr-04 8:36 
Generalconecting with modem Pin
Amirjalaly17-Apr-04 6:42
Amirjalaly17-Apr-04 6:42 
Generalconnecting with modem Pin
Amirjalaly17-Apr-04 6:36
Amirjalaly17-Apr-04 6:36 
Generaldatagrid question Pin
hfuiew17-Apr-04 5:26
hfuiew17-Apr-04 5:26 
GeneralRe: datagrid question Pin
Bitwise Gamgee19-Apr-04 4:22
Bitwise Gamgee19-Apr-04 4:22 
Generalcoloring listbox button control Pin
mausy17-Apr-04 0:33
mausy17-Apr-04 0: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.