how to convert String array to StringBuilder array or vice
versa?

Answer Posted / mohammed ameem

string [] strings = new string[]{"abcd","efgh","ijkl"}();
//create generic list of stringbuilder of length equal to
string array
List<System.Text.StringBuilder> stringBs = new
List<System.Text.StringBuilder>(strings.Length);
for(int i=0;i<strings.Length;i++)
{
stringBS[i] = new StringBuilder(s);//initialize
stringbuilder object
}
StringBuilder [] stringBuilders = stringBS.ToArray();

Is This Answer Correct ?    2 Yes 6 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is an inheritance in c#?

496


Explain acid rule of thumb for transactions in c#.

524


What is the full form of GAC? Explain its uses?

578


What is yield c#?

497


write a C# Program add two matrix ?

575






What is a dimensional array?

464


What is wrong with the sample program below?

535


Which property of the textbox cannot be changed at runtime?

481


Which debugging tools you can use in the .NET ssSDK?

551


Which is better javascript or c#?

504


What is property c#?

505


Define strong name in c#?

523


What is sqldatareader c#?

489


How can you prevent escaping on backslashes in C# with string definitions?

697


What is a reference type c#?

519