| | |
How to append string in front
Please support our C# advertiser: Intel Parallel Studio Home
![]() |
Last edited by Jx_Man; Aug 12th, 2008 at 4:12 am.
Never tried = Never Know
So, Please do something before post your thread.
* PM Asking will be ignored *
So, Please do something before post your thread.
* PM Asking will be ignored *
•
•
Join Date: Aug 2008
Posts: 1,162
Reputation:
Solved Threads: 137
Or you could just go the easy route
C# Syntax (Toggle Plain Text)
string s= "sample"; s = "daniweb " + s;
Last edited by dickersonka; Aug 12th, 2008 at 12:37 pm.
•
•
Join Date: Jul 2008
Posts: 39
Reputation:
Solved Threads: 4
•
•
•
•
Or you could just go the easy route
C# Syntax (Toggle Plain Text)
string s= "sample"; s = "daniweb " + s;
•
•
Join Date: Aug 2008
Posts: 1,162
Reputation:
Solved Threads: 137
Correct nvmobius, I'll add if you are doing this with more than just a simple example like that, might want to try this.
C# Syntax (Toggle Plain Text)
StringBuilder sb = new StringBuilder(); sb.Append("sample"); sb.Insert(0, "daniweb "); string s = sb.ToString();
•
•
Join Date: Jul 2008
Posts: 39
Reputation:
Solved Threads: 4
•
•
•
•
Correct nvmobius, I'll add if you are doing this with more than just a simple example like that, might want to try this.
C# Syntax (Toggle Plain Text)
StringBuilder sb = new StringBuilder(); sb.Append("sample"); sb.Insert(0, "daniweb "); string s = sb.ToString();
![]() |
Similar Threads
- StreamReader and Position (C#)
- Generating N-grams from a word (Python)
- StreamReader and Position (In VB) (VB.NET)
- Problem with byte array to string (Java)
- urgent (Java)
- Here is the doc file for the assignment (C++)
- Finding length (Java)
- Not A Statement? (Java)
- Cannot resolve symbol (Java)
- Cryptography Fun (Python)
Other Threads in the C# Forum
- Previous Thread: Sort/Filter Data in generic collection
- Next Thread: Forms App Behaving Oddly Based On User
| Thread Tools | Search this Thread |
.net access ado.net algorithm array barchart bitmap box broadcast buttons c# chat check checkbox client color combobox control conversion csharp custom database datagrid datagridview dataset datetime degrees development draganddrop drawing encryption enum event excel file files form format forms function gdi+ httpwebrequest image index input install java label list listbox listener mailmerge mandelbrot math mouseclick mysql networking operator path photoshop picturebox pixelinversion post prime programming radians regex remote remoting richtextbox robot save saving serialization server sleep socket sql statistics stream string stringformatting table tcp text textbox thread time timer treeview update usercontrol validation view visualstudio webbrowser windows winforms wpf xml






