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
Can firstordefault return null?
How does c# generics and c++ templates compare?
What is difference between list and ilist in c#?
What is difference between web and window application?
What are strong name assemblies?
What is the resgen.exe tool used for?
How can I use .NET components from COM programs?
What are the 3 types of comments in c#?
What is form feed in c#?
How many types of variables are there in c#?
What exactly is serverless?
How do partial classes work in c#?
How does split work in c#?
if we are updating a database using thread, and mean while application crashes or thread being aborted then what will happen in Database? Rollback or Database will be updated? Please explain with different scenario.
Explain the types of assemblies in .net?