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#?

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

What is type system in c#?

994


What are boxing and unboxing?

970


Why does my windows application pop up a console window every time I run it?

1029


Explain the three services model (three-tier application). Presentation (ui), business (logic and underlying code) and data (from storage or other sources).

967


Can you use foreach iteration on arrays in c#?

1121


What is a bool in c#?

918


How do you escape in c#?

981


Differentiate between static class and singleton instance?

1061


What is a void c#?

964


What are winforms in c#?

963


What is gac? What are the steps to create an assembly and add it to the gac?

976


Define a partial class?

944


Can you store different types in an array in c#?

999


How does split work in c#?

947


Explain circular reference in c#?

995