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 .dbml file?
how to compare numbers and dispaly the largest ? *first thing I wanted to do is to input how many numbers to be compared *and then analyzed the largest then display it.
Can a constructor be private in c#?
What is integer c#?
What is javascriptserializer c#?
What is the relationship between a process, application domain, and application?
What is the difference between a constant and a static readonly field?
What are the different states of a thread?
What is an expression in c#?
What happens if you add duplicate elements to a set?
How to use the sreamReader class to read form a text file?
What is the difference between hashtable and dictionary in c#?
What is marshalling in c#?
Explain the difference between the debug class and trace class?
When would you use generics in your code c#?