Click here to Skip to main content
15,899,126 members
Home / Discussions / C#
   

C#

 
QuestionSearch a string Pin
.NET- India 26-Nov-07 0:59
.NET- India 26-Nov-07 0:59 
AnswerRe: Search a string Pin
m@u26-Nov-07 1:09
m@u26-Nov-07 1:09 
GeneralRe: Search a string Pin
.NET- India 26-Nov-07 1:16
.NET- India 26-Nov-07 1:16 
GeneralRe: Search a string Pin
m@u26-Nov-07 1:22
m@u26-Nov-07 1:22 
GeneralRe: Search a string Pin
Anthony Mushrow26-Nov-07 1:24
professionalAnthony Mushrow26-Nov-07 1:24 
GeneralRe: Search a string Pin
J4amieC26-Nov-07 1:34
J4amieC26-Nov-07 1:34 
GeneralRe: Search a string Pin
Dave Kreskowiak26-Nov-07 4:41
mveDave Kreskowiak26-Nov-07 4:41 
AnswerRe: Search a string Pin
Anthony Mushrow26-Nov-07 1:18
professionalAnthony Mushrow26-Nov-07 1:18 
Well, the easiest way is IndexOf:

string para = "This is a paragraph, with words and stuff.";
int search = para.IndexOf("with words and");


And then search will equal the index of the first letter of the string you where searching for, which in this case is the index of the letter 'w' in the word "with".

Of course, you can't find if it occurs again, and at what location. There's probably some article on this somewhere. Try searching CP and google.

My current favourite word is: PIE!

I have changed my name to my regular internet alias. But don't let the 'Genius' part fool you, you don't know what 'SK' stands for.
-The Undefeated

GeneralRe: Search a string Pin
J4amieC26-Nov-07 1:37
J4amieC26-Nov-07 1:37 
JokeRe: Search a string Pin
Anthony Mushrow26-Nov-07 4:58
professionalAnthony Mushrow26-Nov-07 4:58 
AnswerRe: Search a string Pin
Pete O'Hanlon26-Nov-07 1:24
mvePete O'Hanlon26-Nov-07 1:24 
QuestionStreamWriter mistake Need help fast Pin
Kyle Maldonado26-Nov-07 0:56
Kyle Maldonado26-Nov-07 0:56 
AnswerRe: StreamWriter mistake Need help fast Pin
m@u26-Nov-07 1:48
m@u26-Nov-07 1:48 
GeneralRe: StreamWriter mistake Need help fast Pin
Kyle Maldonado26-Nov-07 1:50
Kyle Maldonado26-Nov-07 1:50 
GeneralRe: StreamWriter mistake Need help fast Pin
m@u26-Nov-07 1:55
m@u26-Nov-07 1:55 
GeneralRe: StreamWriter mistake Need help fast Pin
Kyle Maldonado26-Nov-07 2:28
Kyle Maldonado26-Nov-07 2:28 
GeneralRe: StreamWriter mistake Need help fast Pin
m@u26-Nov-07 2:49
m@u26-Nov-07 2:49 
QuestionSend a string from one form to another forn Pin
Shaahinm26-Nov-07 0:43
Shaahinm26-Nov-07 0:43 
AnswerRe: Send a string from one form to another forn Pin
ZenyukIV26-Nov-07 0:59
ZenyukIV26-Nov-07 0:59 
GeneralRe: Send a string from one form to another forn Pin
Shaahinm26-Nov-07 1:11
Shaahinm26-Nov-07 1:11 
QuestionMessageBox - Increae font size Pin
dubbele onzin26-Nov-07 0:23
dubbele onzin26-Nov-07 0:23 
AnswerRe: MessageBox - Increae font size Pin
martin_hughes26-Nov-07 1:16
martin_hughes26-Nov-07 1:16 
QuestionHow to publish our own website Pin
GaneshKumarVkm26-Nov-07 0:09
GaneshKumarVkm26-Nov-07 0:09 
AnswerRe: How to publish our own website Pin
pmarfleet26-Nov-07 0:11
pmarfleet26-Nov-07 0:11 
QuestionHow to submit info programatically? Pin
sduhd26-Nov-07 0:07
sduhd26-Nov-07 0:07 

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.