Click here to Skip to main content
15,891,184 members
Home / Discussions / C#
   

C#

 
GeneralRe: abstract method in non abstract class Pin
Guffa18-Mar-08 6:40
Guffa18-Mar-08 6:40 
GeneralHashtables and DataGridView Pin
Baconbutty18-Mar-08 1:20
Baconbutty18-Mar-08 1:20 
GeneralRe: Hashtables and DataGridView Pin
James Bond 00718-Mar-08 6:14
James Bond 00718-Mar-08 6:14 
GeneralRe: Hashtables and DataGridView Pin
mmikey718-Mar-08 6:53
mmikey718-Mar-08 6:53 
GeneralPopulate PropertyGrid from XML Pin
firozu18-Mar-08 0:49
firozu18-Mar-08 0:49 
GeneralRe: Populate PropertyGrid from XML Pin
mmikey718-Mar-08 7:02
mmikey718-Mar-08 7:02 
Generalsplitting long string into parts Pin
stephan_00718-Mar-08 0:35
stephan_00718-Mar-08 0:35 
GeneralRe: splitting long string into parts Pin
Mike Marynowski18-Mar-08 0:48
professionalMike Marynowski18-Mar-08 0:48 
string.split also lets you give it a string array parameter, and it will split it everywhere it finds the string(s).

example:

<br />
string x = "test: this string should be split on every occurance of the word test!";<br />
string[] xSplit = x.Split(new string[] { "test" }, StringSplitOptions.None);<br />
<br />
for (int i = 0; i < xSplit.Length; i++)<br />
{<br />
     xSplit[i] = "test" + xSplit[i];<br />
}<br />


after x.Split, xSplit will have the following strings:

[0] - ": this string should be split on every occurance of the word "
[1] - "!"

because the delimiting string gets removed.

After the for loop, it will have:

[0] - "test: this string should be split on every occurance of the word "
[1] - "test!"

which I think is what you are looking to do!
GeneralRe: splitting long string into parts Pin
Mike Marynowski18-Mar-08 0:56
professionalMike Marynowski18-Mar-08 0:56 
GeneralRe: splitting long string into parts Pin
PIEBALDconsult18-Mar-08 5:47
mvePIEBALDconsult18-Mar-08 5:47 
GeneralRe: splitting long string into parts Pin
Mike Marynowski18-Mar-08 11:28
professionalMike Marynowski18-Mar-08 11:28 
GeneralRe: splitting long string into parts Pin
PIEBALDconsult18-Mar-08 14:55
mvePIEBALDconsult18-Mar-08 14:55 
GeneralRe: splitting long string into parts Pin
Mike Marynowski19-Mar-08 7:31
professionalMike Marynowski19-Mar-08 7:31 
GeneralRe: splitting long string into parts Pin
PIEBALDconsult19-Mar-08 7:58
mvePIEBALDconsult19-Mar-08 7:58 
GeneralRe: splitting long string into parts Pin
Chetan Patel18-Mar-08 1:00
Chetan Patel18-Mar-08 1:00 
GeneralRe: splitting long string into parts Pin
Christian Graus18-Mar-08 1:12
protectorChristian Graus18-Mar-08 1:12 
GeneralRe: splitting long string into parts Pin
PIEBALDconsult18-Mar-08 5:55
mvePIEBALDconsult18-Mar-08 5:55 
Generalcontrol focusing problem Pin
Mike Marynowski18-Mar-08 0:24
professionalMike Marynowski18-Mar-08 0:24 
Questioncan service open a C# application Pin
Knowledgestudent18-Mar-08 0:18
Knowledgestudent18-Mar-08 0:18 
GeneralRe: can service open a C# application Pin
Mike Marynowski18-Mar-08 0:30
professionalMike Marynowski18-Mar-08 0:30 
AnswerRe: can service open a C# application Pin
EvilInside18-Mar-08 2:04
EvilInside18-Mar-08 2:04 
GeneralRe: can service open a C# application Pin
PIEBALDconsult18-Mar-08 5:59
mvePIEBALDconsult18-Mar-08 5:59 
QuestionRe: can service open a C# application Pin
Knowledgestudent18-Mar-08 21:34
Knowledgestudent18-Mar-08 21:34 
GeneralRe: can service open a C# application Pin
Mike Marynowski19-Mar-08 7:43
professionalMike Marynowski19-Mar-08 7:43 
GeneralRe: can service open a C# application Pin
PIEBALDconsult19-Mar-08 8:37
mvePIEBALDconsult19-Mar-08 8:37 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.