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

C#

 
GeneralRe: problem with interoperability Pin
Skippums14-Feb-08 12:22
Skippums14-Feb-08 12:22 
QuestionWM_CONTEXTMENU ? Pin
god4k14-Feb-08 7:24
god4k14-Feb-08 7:24 
AnswerRe: WM_CONTEXTMENU ? Pin
new2pgrmg14-Feb-08 23:36
new2pgrmg14-Feb-08 23:36 
QuestionThread-safetiness of XmlSerializer Pin
Le centriste14-Feb-08 4:43
Le centriste14-Feb-08 4:43 
GeneralRe: Thread-safetiness of XmlSerializer Pin
Martin#14-Feb-08 5:18
Martin#14-Feb-08 5:18 
GeneralRe: Thread-safetiness of XmlSerializer Pin
led mike14-Feb-08 5:50
led mike14-Feb-08 5:50 
GeneralRe: Thread-safetiness of XmlSerializer Pin
Le centriste14-Feb-08 6:02
Le centriste14-Feb-08 6:02 
GeneralRe: Thread-safetiness of XmlSerializer Pin
led mike14-Feb-08 8:34
led mike14-Feb-08 8:34 
Well I could have figured out your construct from your post but I didn't.

You actually have two things you need to worry about. The instance of XmlSerializer and the Stream.

A rule of thumb is that static methods should be thread safe where instance methods cannot be assumed to be thread safe. Your static method is not since it uses an instance member to perform it's work. You could synchronize access or create a new Serializer instance in the static method. However neither guarantees thread safty of the Stream.


led mike

GeneralRe: Thread-safetiness of XmlSerializer Pin
Le centriste14-Feb-08 8:40
Le centriste14-Feb-08 8:40 
GeneralRe: Thread-safetiness of XmlSerializer Pin
led mike14-Feb-08 9:03
led mike14-Feb-08 9:03 
GeneralRe: Thread-safetiness of XmlSerializer Pin
Le centriste14-Feb-08 9:11
Le centriste14-Feb-08 9:11 
GeneralRe: Thread-safetiness of XmlSerializer Pin
led mike14-Feb-08 9:21
led mike14-Feb-08 9:21 
GeneralRe: Thread-safetiness of XmlSerializer Pin
Le centriste14-Feb-08 9:25
Le centriste14-Feb-08 9:25 
GeneralGraph excel with C# Pin
JeremH14-Feb-08 4:34
JeremH14-Feb-08 4:34 
GeneralRe: Graph excel with C# Pin
Cwenee23-Sep-09 5:17
Cwenee23-Sep-09 5:17 
GeneralLoadProperties Pin
s3rro14-Feb-08 4:04
s3rro14-Feb-08 4:04 
GeneralRe: LoadProperties Pin
s3rro14-Feb-08 4:09
s3rro14-Feb-08 4:09 
GeneralRe: LoadProperties Pin
led mike14-Feb-08 4:34
led mike14-Feb-08 4:34 
GeneralC# Serial port communication Pin
Scalpa14-Feb-08 3:53
Scalpa14-Feb-08 3:53 
GeneralRe: C# Serial port communication Pin
DaveyM6914-Feb-08 4:14
professionalDaveyM6914-Feb-08 4:14 
GeneralRe: C# Serial port communication Pin
Scalpa14-Feb-08 4:24
Scalpa14-Feb-08 4:24 
GeneralRe: C# Serial port communication Pin
Luc Pattyn14-Feb-08 4:42
sitebuilderLuc Pattyn14-Feb-08 4:42 
GeneralRe: C# Serial port communication Pin
Scalpa14-Feb-08 5:22
Scalpa14-Feb-08 5:22 
GeneralRe: C# Serial port communication Pin
Luc Pattyn14-Feb-08 5:34
sitebuilderLuc Pattyn14-Feb-08 5:34 
GeneralRe: C# Serial port communication Pin
Scalpa14-Feb-08 5:45
Scalpa14-Feb-08 5:45 

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.