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 are functions in c#?

0 Answers  


Define satellite Assembly in .NET?

0 Answers   DELL,


What are static and dynamic variables?

0 Answers   CGI,


What is the difference between == and object.equals?

0 Answers  


What is the minimum size (in bytes) of string data type in c#? Give its compatible data type in .NET Framework.

5 Answers  


What is action in c# 3.5?

0 Answers  


Does c# replace c++?

0 Answers  


what is a static constructor?

0 Answers  


What is Signature and parameter in overloading ?

3 Answers  


Can we change static value in c#?

0 Answers  


i need to insert data into sql server table emp through textboxes txtname and txtsalary using c# code. Please help

1 Answers  


What is difference between array and list?

0 Answers  


Categories