Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


What are strin concatation methods in c#?



What are strin concatation methods in c#?..

Answer / kishoreg

Generally in c# strings were concatinated with symbol '+'
1)'+'
string myName;
myName='GVK' + 'kishore';
2)Append
If it is StringBuilder then we can join as below
StringBuilderObject.Append('GVK');
StringBuilderObject.Append('kishore');
3)Join
Join takes a String array and a separator string and
produces a single string with one separator between each
element in the array.Split does the opposite, splitting a
string made up of several elements separated by a
separator.
Ex. string commatext = "alpha,bravo,charlie";
string[] words = commatext.Split(',');
string dashed = string.Join("---", words);
MessageBox.Show(dashed);

Hope helpfull...KishoreG

Is This Answer Correct ?    5 Yes 1 No

Post New Answer

More C Sharp Interview Questions

What is a Assembly?

0 Answers   UGC Corporation,


What is state c#?

0 Answers  


What is anonymous methods in c#?

0 Answers  


Explain about Oops concept

0 Answers   Digital GlobalSoft,


How do I create a multilanguage, single-file assembly?

0 Answers  


Describe the parts of assembly.

0 Answers  


What is method and function in c#?

0 Answers  


How structure objects are destroyed? As GC releases only the objects in stack, and structure is a value type and stored in heap. So how structure objects are released?

2 Answers  


What is cls, cts and clr in net?

0 Answers  


Is null empty or whitespace c#?

0 Answers  


What is connection pooling in ado.net?

0 Answers  


What does string intern do?

0 Answers  


Categories