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 |
What are the collections in c#?
What is the main usage of keyword “virtual†? How does it work for a method or property?
How To Maintain Transaction In C#?
1 Answers Phoenix Technologies,
Can a dictionary have duplicate keys c#?
What are the types of comment in c# with examples?
What is the different types of private assembly and shared assembly?
What is difference between dictionary and hashtable in c#?
What is the difference between a constant and a static readonly field?
I have to create a windows application using C# .net to Modifiy the XML file. The application have to show the node and node value. plz help me.
What is the difference between an XML "Fragment" and an XML "Document." ?
How do I create a single-file assembly?
How to use session under class file of APP_Code folder?
Visual Basic (800)
C Sharp (3816)
ASP.NET (3180)
VB.NET (461)
COM+ (79)
ADO.NET (717)
IIS (369)
MTS (11)
Crystal Reports (81)
BizTalk (89)
Dot Net (2435)
Exchange Server (362)
SharePoint (720)
WCF (340)
MS Office Microsoft (6963)
LINQ Language-Integrated Query (317)
WPF (371)
TypeScript (144)
Microsoft Related AllOther (311)