Click here to Skip to main content
15,914,163 members
Home / Discussions / C#
   

C#

 
QuestionYaml Parser C# Pin
Member 884142017-Apr-12 11:47
Member 884142017-Apr-12 11:47 
AnswerRe: Yaml Parser C# Pin
Richard Andrew x6417-Apr-12 11:56
professionalRichard Andrew x6417-Apr-12 11:56 
GeneralRe: Yaml Parser C# Pin
Roger Wright17-Apr-12 19:46
professionalRoger Wright17-Apr-12 19:46 
GeneralRe: Yaml Parser C# Pin
Pete O'Hanlon17-Apr-12 21:38
mvePete O'Hanlon17-Apr-12 21:38 
QuestionHow to dynamically bind datasource to RDLC report Pin
maniceca17-Apr-12 10:48
maniceca17-Apr-12 10:48 
QuestionAny progammers in the Oak Harbor, WA area? Pin
jeramyRR17-Apr-12 6:30
jeramyRR17-Apr-12 6:30 
AnswerRe: Any progammers in the Oak Harbor, WA area? Pin
Abhinav S17-Apr-12 7:00
Abhinav S17-Apr-12 7:00 
GeneralRe: Any progammers in the Oak Harbor, WA area? Pin
jeramyRR17-Apr-12 8:42
jeramyRR17-Apr-12 8:42 
Questiondesign of a commercial site Pin
tuhami17-Apr-12 6:09
tuhami17-Apr-12 6:09 
AnswerRe: design of a commercial site Pin
Eddy Vluggen17-Apr-12 6:31
professionalEddy Vluggen17-Apr-12 6:31 
AnswerRe: design of a commercial site Pin
Abhinav S17-Apr-12 7:03
Abhinav S17-Apr-12 7:03 
QuestionHow to send hashtable parameter in restful client Pin
NarVish17-Apr-12 3:56
NarVish17-Apr-12 3:56 
Questioncrystal report can be sent vai e-mail as a body Pin
narendra ingale16-Apr-12 23:54
narendra ingale16-Apr-12 23:54 
AnswerRe: crystal report can be sent vai e-mail as a body Pin
V.17-Apr-12 0:53
professionalV.17-Apr-12 0:53 
QuestionStringbuilder Pin
jeramyRR16-Apr-12 19:24
jeramyRR16-Apr-12 19:24 
AnswerRe: Stringbuilder Pin
egenis16-Apr-12 19:34
egenis16-Apr-12 19:34 
AnswerRe: Stringbuilder PinPopular
VJ Reddy16-Apr-12 19:38
VJ Reddy16-Apr-12 19:38 
In .NET, string class is immutable. Simply put, it means that you cannot modify a string after it's creation. So, for example
C#
string someString = "Hello";
//Now if we write
someString += " World";
The program will not add World to the existing string. Instead, it will create a new string object "Hello World" and assigns this to someString and discards the earlier object "Hello". So, this may not be a big issue if we are dealing with only a few strings. But, if we want to deal with several string operations, then StringBuilder is a good option. As explained here http://msdn.microsoft.com/en-us/library/y9sxk6fy.aspx[^]

This class represents a string-like object whose value is a mutable sequence of characters. The value is said to be mutable because it can be modified once it has been created by appending, removing, replacing, or inserting characters.
And after making all the modifications ToString method of StringBuilder can be used to get the final string.
I think this Code Project article
StringBuilder vs. String, Fast String Operations with .NET 2.0[^]
may be helpful.

modified 17-Apr-12 11:46am.

GeneralRe: Stringbuilder Pin
jeramyRR16-Apr-12 20:00
jeramyRR16-Apr-12 20:00 
AnswerRe: Stringbuilder PinPopular
Abhinav S16-Apr-12 19:50
Abhinav S16-Apr-12 19:50 
GeneralRe: Stringbuilder Pin
VJ Reddy16-Apr-12 19:58
VJ Reddy16-Apr-12 19:58 
GeneralRe: Stringbuilder Pin
Anurag Sarkar16-Apr-12 19:59
Anurag Sarkar16-Apr-12 19:59 
AnswerRe: Stringbuilder Pin
Keith Barrow16-Apr-12 23:00
professionalKeith Barrow16-Apr-12 23:00 
GeneralRe: Stringbuilder Pin
VJ Reddy16-Apr-12 23:31
VJ Reddy16-Apr-12 23:31 
QuestionProgramatically add digital signature to a document uploaded in Sharepoint library Pin
NishaTM16-Apr-12 16:48
NishaTM16-Apr-12 16:48 
QuestionOptimising XML Pin
si_6916-Apr-12 8:01
si_6916-Apr-12 8:01 

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.