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 we customize the serialization process?
For read-only operation which property you have to designated?
Can a class be protected in c#?
Why do we use hashtable in c#?
Is it possible to have a static indexer in c#? Allowed in c#.
What is difference between code access and role based security?
Is c# strongly typed?
What is escape character in c#?
What are indexers in c# .net?
Is xml tags are case sensitive?
What is a template class?
These questions were asked me in a technical interview: •If we deploy an application on multiple server (like database server, web server) then, each request should be redirected to proper server, then how you will handle it in your code? •How security pinholes will be handled in an application? •What things should be considered while writing a web application? •How will you do load/performance testing of web application? Which framework you will use for it? •How will you implement a cache for results which require a DB access? Please let me know how to write an web application considering all these points. I am not so much aware of architechural design of web application. Your guidelines will be helpful.
In object oriented programming, how would you describe encapsulation in c#?
What is platform independence"?
What is readline library?