Click here to Skip to main content
15,923,083 members
Home / Discussions / C#
   

C#

 
GeneralRe: how to use XPath to parse the XML file? Pin
Abhijit Jana6-Jan-09 0:53
professionalAbhijit Jana6-Jan-09 0:53 
QuestionRun .NET ActiveX control on IE 7.0 machine that doesnt have .NET installed. Pin
Dattatraya K5-Jan-09 2:51
Dattatraya K5-Jan-09 2:51 
AnswerCrossPost : Please Ignore Pin
Abhijit Jana5-Jan-09 2:57
professionalAbhijit Jana5-Jan-09 2:57 
AnswerRe: Run .NET ActiveX control on IE 7.0 machine that doesnt have .NET installed. Pin
Dave Kreskowiak5-Jan-09 3:51
mveDave Kreskowiak5-Jan-09 3:51 
QuestionInner/Nested classes with NHibernate Pin
devvvy5-Jan-09 2:41
devvvy5-Jan-09 2:41 
AnswerRe: Inner/Nested classes with NHibernate Pin
realbart10-Sep-12 5:03
realbart10-Sep-12 5:03 
GeneralRe: Inner/Nested classes with NHibernate Pin
devvvy10-Sep-12 14:37
devvvy10-Sep-12 14:37 
QuestionThread safe issue in string operation Pin
George_George5-Jan-09 2:07
George_George5-Jan-09 2:07 
Hello everyone,

Support I am using str1 = str2 statement, both str1 and str2 are type of string.

Then, suppose str1 is hold by thread 1 and str2 is hold by thread 2. My question is whether operation (for example, tryu to change content of the string, toupper, tolower, replacement) on str1 (from thread 1) and operaton on str2 (from thread 2) are thread safe?

My idea is it is thread safe, since even if str1 and str2 are pointing to the same string instance, but as string is immutable, i.e. each operation which will change the content of the string will make a new string. So, it is thread safe.

Am I correct?

thanks in advance,
George
AnswerRe: Thread safe issue in string operation Pin
moon_stick5-Jan-09 2:30
moon_stick5-Jan-09 2:30 
GeneralRe: Thread safe issue in string operation Pin
George_George5-Jan-09 3:27
George_George5-Jan-09 3:27 
GeneralRe: Thread safe issue in string operation Pin
moon_stick5-Jan-09 3:36
moon_stick5-Jan-09 3:36 
GeneralRe: Thread safe issue in string operation Pin
George_George5-Jan-09 3:40
George_George5-Jan-09 3:40 
GeneralRe: Thread safe issue in string operation Pin
moon_stick5-Jan-09 4:10
moon_stick5-Jan-09 4:10 
GeneralRe: Thread safe issue in string operation Pin
George_George5-Jan-09 22:42
George_George5-Jan-09 22:42 
GeneralRe: Thread safe issue in string operation Pin
moon_stick6-Jan-09 0:34
moon_stick6-Jan-09 0:34 
GeneralRe: Thread safe issue in string operation Pin
George_George6-Jan-09 0:40
George_George6-Jan-09 0:40 
GeneralRe: Thread safe issue in string operation Pin
moon_stick6-Jan-09 0:45
moon_stick6-Jan-09 0:45 
GeneralRe: Thread safe issue in string operation Pin
George_George10-Jan-09 2:42
George_George10-Jan-09 2:42 
GeneralRe: Thread safe issue in string operation Pin
J4amieC5-Jan-09 4:19
J4amieC5-Jan-09 4:19 
GeneralRe: Thread safe issue in string operation Pin
George_George5-Jan-09 22:43
George_George5-Jan-09 22:43 
GeneralRe: Thread safe issue in string operation Pin
led mike5-Jan-09 5:10
led mike5-Jan-09 5:10 
GeneralRe: Thread safe issue in string operation Pin
moon_stick5-Jan-09 5:27
moon_stick5-Jan-09 5:27 
GeneralRe: Thread safe issue in string operation Pin
George_George5-Jan-09 22:45
George_George5-Jan-09 22:45 
GeneralRe: Thread safe issue in string operation Pin
George_George5-Jan-09 22:44
George_George5-Jan-09 22:44 
AnswerRe: Thread safe issue in string operation Pin
Abhijit Jana5-Jan-09 2:40
professionalAbhijit Jana5-Jan-09 2:40 

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.