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 is a Assembly?
What is state c#?
What is anonymous methods in c#?
Explain about Oops concept
How do I create a multilanguage, single-file assembly?
Describe the parts of assembly.
What is method and function in c#?
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?
What is cls, cts and clr in net?
Is null empty or whitespace c#?
What is connection pooling in ado.net?
What does string intern do?
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)