what is the fastest way to concatenate strings in c sharp?

Answers were Sorted based on User's Feedback



what is the fastest way to concatenate strings in c sharp?..

Answer / sudheer

string.Concat("DotNet","4.0");

Ans:DotNet4.0

Is This Answer Correct ?    14 Yes 3 No

what is the fastest way to concatenate strings in c sharp?..

Answer / manish sharma

through string builder class is the fastest method.we should
use this method if we have to catenate more than 10 strings.

Is This Answer Correct ?    9 Yes 0 No

what is the fastest way to concatenate strings in c sharp?..

Answer / biruk solomon

The fastest way to concatinate string is to use
StringBuilder object.In StringBuilder object you can use a
method called Append.It has 19 overloaded method to support
different kind of datatype.You can also include your own
type if you override the toString method as you can also
pass objects to this method.

Is This Answer Correct ?    8 Yes 0 No

what is the fastest way to concatenate strings in c sharp?..

Answer / sudheer

sorry for last post.This is one is faster than previous one.
string str = "DotNet " + "4.0";

Is This Answer Correct ?    9 Yes 3 No

Post New Answer

More C Sharp Interview Questions

Can an abstract class inherit from another abstract class c#?

0 Answers  


What is the difference between list and array in c#?

0 Answers  


What is difference between class and interface in c#?

0 Answers  


Can you inherit from a static class in c#?

0 Answers  


Write a functin to add two no. Both no can be int, float.

3 Answers   HCL,






How are Windows programs different from normal C-programs?

0 Answers   Tech Mahindra,


Assembly Code. in Rejester AL. How do Contast Replece( or Change): Bit D3 With Bit D4 and Bit D2 With Bit D5 and Bit D1 With Bit D6 and Bit D0 With Bit D7 I am Not Know Very Well Write English.

0 Answers   IBM,


Why do we use lambda expression in c#?

0 Answers  


Are private class-level variables inherited?

5 Answers   HCL, Siebel Systems, Visual Soft,


What is throw in c#?

0 Answers  


What is delegates in c# and uses of delegates?

0 Answers  


Constructor to an arbitrary base constructor?

0 Answers  


Categories