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

What is difference between sleep () and wait ()?

0 Answers  


There are a class A. Another class B derived from it. Now if I do A a = new B(); and B b = new B(); What will happen in both the statements. And what is the difference between these two statements.

3 Answers   HCL,


Explain the difference between a sub and a function in c#.

0 Answers  


What is hiding in CSharp ?

1 Answers  


What is check/uncheck?

0 Answers  


What is property in c#?

0 Answers  


Explain boxing and unboxing in c#?

0 Answers  


What is type safe in c#?

0 Answers  


What is verbatim string literal in c#?

0 Answers  


Is ram a heap?

0 Answers  


What is a console application in c#?

0 Answers  


What does a constructor do c#?

0 Answers  


Categories