stringbuilder to string
-
Hello, When i am trying to copy stringbuilder to string it copies the same string twice or 3 times for example if i do: stringbuilder temp=new stringbuilder(); string temp1; temp1=temp.tostring(); if temp="abc"; then temp1 gets- "abcabcabc" why is that?
-
Hello, When i am trying to copy stringbuilder to string it copies the same string twice or 3 times for example if i do: stringbuilder temp=new stringbuilder(); string temp1; temp1=temp.tostring(); if temp="abc"; then temp1 gets- "abcabcabc" why is that?
Try !ispostback
try and try untill reach success..
-
Try !ispostback
try and try untill reach success..
how do i use it?
-
Hello, When i am trying to copy stringbuilder to string it copies the same string twice or 3 times for example if i do: stringbuilder temp=new stringbuilder(); string temp1; temp1=temp.tostring(); if temp="abc"; then temp1 gets- "abcabcabc" why is that?
-
Try !ispostback
try and try untill reach success..
IsPostback is relevant to ASP.NET. The OP did not say what environment he was using so your answer could be completely irrelevant and worse misleading.
I know the language. I've read a book. - _Madmatt
-
Hello, When i am trying to copy stringbuilder to string it copies the same string twice or 3 times for example if i do: stringbuilder temp=new stringbuilder(); string temp1; temp1=temp.tostring(); if temp="abc"; then temp1 gets- "abcabcabc" why is that?
You haven't shown any code that actually adds values to the stringbuilder. Where is that? Are you calling it multiple times perhaps.
I know the language. I've read a book. - _Madmatt
-
You haven't shown any code that actually adds values to the stringbuilder. Where is that? Are you calling it multiple times perhaps.
I know the language. I've read a book. - _Madmatt
I fount my mistake. I had a method that returns a stringbuilder and receives a stringbuilder. for example: private stringbuilder method1(stringbuilder temp) { temp.append("abc"); } private void main_method() { stringbuilder main=new stringbuilder(); main.append(method1(main)); } something like that
-
Hello, When i am trying to copy stringbuilder to string it copies the same string twice or 3 times for example if i do: stringbuilder temp=new stringbuilder(); string temp1; temp1=temp.tostring(); if temp="abc"; then temp1 gets- "abcabcabc" why is that?
michaelgr1 wrote:
if temp="abc";
Hmmmm.... Show us as much of the actual associated code as you can...
.45 ACP - because shooting twice is just silly
-----
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
-----
"The staggering layers of obscenity in your statement make it a work of art on so many levels." - J. Jystad, 2001