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
Difference between call by value and call by reference in C#?
What is a statement c#?
What is the symbol used for in c#?
Can I define my own exceptions?
Can we declare class as protected?
What is the use of console?
How can you access a private method of a class?
What are concrete classes?
What is a decimal c#?
Why is hashset faster?
Explain about multithreading?
What is a hash table in c#?
How do you clear a list in c#?
Hi to all..I have to create an intranet application on C#.NET windows Application so please please let can you people help me as iam new in .NET and if u have any samples or website address from where i can get sample please let know.
What is generic method in c#?