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

C#

 
QuestionLicensing in .NET Pin
danielk_28-Oct-07 2:33
danielk_28-Oct-07 2:33 
AnswerRe: Licensing in .NET Pin
Scott Dorman28-Oct-07 3:24
professionalScott Dorman28-Oct-07 3:24 
GeneralRe: Licensing in .NET Pin
jmcc2k24-Nov-10 17:37
jmcc2k24-Nov-10 17:37 
QuestionGraph Pin
babbelfisken28-Oct-07 2:05
babbelfisken28-Oct-07 2:05 
AnswerRe: Graph Pin
Robert Rohde28-Oct-07 2:10
Robert Rohde28-Oct-07 2:10 
QuestionArray as a buffer in multithreading Pin
szolDat28-Oct-07 1:37
szolDat28-Oct-07 1:37 
AnswerRe: Array as a buffer in multithreading Pin
Robert Rohde28-Oct-07 2:21
Robert Rohde28-Oct-07 2:21 
AnswerRe: Array as a buffer in multithreading Pin
Guffa28-Oct-07 3:37
Guffa28-Oct-07 3:37 
Just my though. Smile | :)

However, there is two things wrong with your class.

First, you forgot to set _isLocked to true in the LockStream method.

Second, you should add an object to use for the locking. As the MemoryStream object is reachable outside the class, it could be used in a lock statement outside the class, which could cause a deadlock situation. Using a private object that isn't available outside the class prevents that.

Smile | :)

---
"Anything that is in the world when you're born is normal and ordinary and is just a natural part of the way the world works. Anything that's invented between when you're fifteen and thirty-five is new and exciting and revolutionary and you can probably get a career in it. Anything invented after you're thirty-five is against the natural order of things."
-- Douglas Adams

GeneralRe: Array as a buffer in multithreading Pin
szolDat28-Oct-07 7:53
szolDat28-Oct-07 7:53 
AnswerRe: Array as a buffer in multithreading Pin
Guffa28-Oct-07 10:09
Guffa28-Oct-07 10:09 
AnswerRe: Array as a buffer in multithreading Pin
szolDat28-Oct-07 10:40
szolDat28-Oct-07 10:40 
GeneralRe: Array as a buffer in multithreading Pin
Guffa29-Oct-07 11:59
Guffa29-Oct-07 11:59 
AnswerRe: Array as a buffer in multithreading Pin
szolDat29-Oct-07 12:53
szolDat29-Oct-07 12:53 
QuestionControls Display Delay Pin
half-life28-Oct-07 0:39
half-life28-Oct-07 0:39 
AnswerRe: Controls Display Delay Pin
il_masacratore28-Oct-07 12:43
il_masacratore28-Oct-07 12:43 
GeneralRe: Controls Display Delay Pin
half-life28-Oct-07 12:47
half-life28-Oct-07 12:47 
QuestionHow to recored and play mp3 files? Pin
Mohsen Saad28-Oct-07 0:23
Mohsen Saad28-Oct-07 0:23 
AnswerRe: How to recored and play mp3 files? Pin
Giorgi Dalakishvili28-Oct-07 1:03
mentorGiorgi Dalakishvili28-Oct-07 1:03 
QuestionNotify Control Pin
Thaer Hamael27-Oct-07 21:29
Thaer Hamael27-Oct-07 21:29 
AnswerRe: Notify Control Pin
mav.northwind27-Oct-07 22:46
mav.northwind27-Oct-07 22:46 
GeneralRe: Notify Control Pin
Thaer Hamael27-Oct-07 23:07
Thaer Hamael27-Oct-07 23:07 
GeneralRe: Notify Control Pin
mav.northwind27-Oct-07 23:32
mav.northwind27-Oct-07 23:32 
AnswerRe: Notify Control Pin
Luc Pattyn28-Oct-07 5:11
sitebuilderLuc Pattyn28-Oct-07 5:11 
QuestionProgram that makes a Program Pin
sublimies27-Oct-07 18:20
sublimies27-Oct-07 18:20 
AnswerRe: Program that makes a Program Pin
DaveX8627-Oct-07 19:19
DaveX8627-Oct-07 19:19 

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.