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
What is an inheritance in c#?
Explain acid rule of thumb for transactions in c#.
What is the full form of GAC? Explain its uses?
What is yield c#?
write a C# Program add two matrix ?
What is a dimensional array?
What is wrong with the sample program below?
Which property of the textbox cannot be changed at runtime?
Which debugging tools you can use in the .NET ssSDK?
Which is better javascript or c#?
What is property c#?
Define strong name in c#?
What is sqldatareader c#?
How can you prevent escaping on backslashes in C# with string definitions?
What is a reference type c#?