Click here to Skip to main content
15,921,884 members
Home / Discussions / C#
   

C#

 
GeneralRe: MessageBox with a timer? Pin
Vertekal16-Apr-08 9:57
Vertekal16-Apr-08 9:57 
QuestionObject of type 'A' cannot be converted to type 'A' with own Control. Pin
Roland Bär16-Apr-08 7:33
Roland Bär16-Apr-08 7:33 
AnswerRe: Object of type 'A' cannot be converted to type 'A' with own Control. Pin
Judah Gabriel Himango16-Apr-08 8:19
sponsorJudah Gabriel Himango16-Apr-08 8:19 
GeneralRe: Object of type 'A' cannot be converted to type 'A' with own Control. Pin
Roland Bär20-Apr-08 23:31
Roland Bär20-Apr-08 23:31 
Generalsave data to application settings Pin
Razvan Dimescu16-Apr-08 5:38
Razvan Dimescu16-Apr-08 5:38 
GeneralRe: save data to application settings Pin
Alan N16-Apr-08 7:40
Alan N16-Apr-08 7:40 
Generalread write lock in C# Pin
George_George16-Apr-08 4:51
George_George16-Apr-08 4:51 
GeneralRe: read write lock in C# Pin
Zoltan Balazs16-Apr-08 9:07
Zoltan Balazs16-Apr-08 9:07 
Readers can acquire the lock only if there are no writer threads. You did not specify if you are using AcquireReaderLock or AcquireWriterLock. Anyway if you acquire the lock (reader or writer) and you try to call the Release method twice you'll get an exception.

These operations are exclusive (you have a lock for one or more readers or you have a lock for only one single writer). The AcquireReaderLock, AcquireWriterLock methods supports a timeout value, if the timeout expires an exception is thrown.

From MSDN:
"If the current thread already has the writer lock, no reader lock is acquired. Instead, the lock count on the writer lock is incremented. This prevents a thread from blocking on its own writer lock. The result is exactly the same as calling AcquireWriterLock, and an additional call to ReleaseWriterLock is required when releasing the writer lock."

"AcquireReaderLock supports recursive reader-lock requests. That is, a thread can call AcquireReaderLock multiple times, which increments the lock count each time. You must call ReleaseReaderLock once for each time you call AcquireReaderLock. Alternatively, you can call ReleaseLock to reduce the lock count to zero immediately."


GeneralRe: read write lock in C# Pin
George_George16-Apr-08 17:29
George_George16-Apr-08 17:29 
GeneralRe: read write lock in C# [modified] Pin
N a v a n e e t h16-Apr-08 18:21
N a v a n e e t h16-Apr-08 18:21 
GeneralRe: read write lock in C# Pin
Zoltan Balazs16-Apr-08 19:38
Zoltan Balazs16-Apr-08 19:38 
GeneralRe: read write lock in C# Pin
N a v a n e e t h16-Apr-08 19:54
N a v a n e e t h16-Apr-08 19:54 
GeneralRe: read write lock in C# Pin
George_George17-Apr-08 1:41
George_George17-Apr-08 1:41 
GeneralRe: read write lock in C# Pin
N a v a n e e t h17-Apr-08 18:05
N a v a n e e t h17-Apr-08 18:05 
GeneralRe: read write lock in C# Pin
George_George17-Apr-08 19:32
George_George17-Apr-08 19:32 
GeneralForm window position when changing its size Pin
Blubbo16-Apr-08 4:05
Blubbo16-Apr-08 4:05 
GeneralRe: Form window position when changing its size Pin
Blubbo16-Apr-08 4:12
Blubbo16-Apr-08 4:12 
GeneralRe: Form window position when changing its size Pin
Muammar©16-Apr-08 10:03
Muammar©16-Apr-08 10:03 
QuestionHow to make a phone call? Pin
tcombs0716-Apr-08 3:56
tcombs0716-Apr-08 3:56 
AnswerRe: How to make a phone call? Pin
N a v a n e e t h16-Apr-08 4:00
N a v a n e e t h16-Apr-08 4:00 
GeneralRe: How to make a phone call? Pin
Ravenet16-Apr-08 16:10
Ravenet16-Apr-08 16:10 
AnswerRe: How to make a phone call? Pin
flippydeflippydebop16-Apr-08 4:27
flippydeflippydebop16-Apr-08 4:27 
AnswerRe: How to make a phone call? Pin
Bert delaVega16-Apr-08 7:10
Bert delaVega16-Apr-08 7:10 
AnswerRe: How to make a phone call? Pin
Judah Gabriel Himango16-Apr-08 8:19
sponsorJudah Gabriel Himango16-Apr-08 8:19 
GeneralRe: How to make a phone call? Pin
Muammar©16-Apr-08 9:58
Muammar©16-Apr-08 9:58 

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.