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

C#

 
GeneralRe: rtsp protocol Pin
leppie9-Jul-05 14:14
leppie9-Jul-05 14:14 
GeneralRich Edit TextBox Pin
Akrynite9-Jul-05 9:28
Akrynite9-Jul-05 9:28 
GeneralRe: Rich Edit TextBox Pin
Judah Gabriel Himango9-Jul-05 10:58
sponsorJudah Gabriel Himango9-Jul-05 10:58 
GeneralRe: Rich Edit TextBox Pin
Anonymous9-Jul-05 11:04
Anonymous9-Jul-05 11:04 
GeneralRe: Rich Edit TextBox Pin
Anonymous9-Jul-05 12:14
Anonymous9-Jul-05 12:14 
GeneralAccessing the parallel port Pin
asif amjad9-Jul-05 9:22
asif amjad9-Jul-05 9:22 
GeneralRe: Accessing the parallel port Pin
Anonymous9-Jul-05 11:38
Anonymous9-Jul-05 11:38 
GeneralRemoving selected text from a string Pin
Member 20300389-Jul-05 8:19
Member 20300389-Jul-05 8:19 
I'm trying to compare words entered in a textbox with a selection of stop-words, removing any stopwords that are found. Here's a snippet.

string text = this.textBox1.Text;
if(RemoveMe(s))
{
int startIndex = text.IndexOf(s);
int endIndex = s.Length-1;
text = text.Remove(startIndex, startIndex+endIndex);
}

Problem is, every now and then startIndex get a value of -1...
Kinda stumped here, what am I doing wrong?
GeneralRe: Removing selected text from a string Pin
Snowblind379-Jul-05 8:29
Snowblind379-Jul-05 8:29 
GeneralRe: Removing selected text from a string Pin
User 66589-Jul-05 8:34
User 66589-Jul-05 8:34 
GeneralRe: Removing selected text from a string Pin
Member 20300389-Jul-05 8:48
Member 20300389-Jul-05 8:48 
GeneralRe: Removing selected text from a string Pin
Guffa9-Jul-05 8:38
Guffa9-Jul-05 8:38 
GeneralRe: Removing selected text from a string Pin
Member 20300389-Jul-05 8:52
Member 20300389-Jul-05 8:52 
GeneralRe: Removing selected text from a string Pin
User 66589-Jul-05 9:09
User 66589-Jul-05 9:09 
GeneralRe: Removing selected text from a string Pin
Member 20300389-Jul-05 9:25
Member 20300389-Jul-05 9:25 
Questioncreating installer, startup??? Pin
marazm19-Jul-05 6:58
marazm19-Jul-05 6:58 
AnswerRe: creating installer, startup??? Pin
marazm19-Jul-05 7:48
marazm19-Jul-05 7:48 
AnswerRe: creating installer, startup??? Pin
amitmohanty9-Jul-05 15:16
amitmohanty9-Jul-05 15:16 
AnswerHERE IS THE ANSWER Pin
marazm19-Jul-05 16:20
marazm19-Jul-05 16:20 
GeneralRe: HERE IS THE ANSWER Pin
amitmohanty9-Jul-05 18:17
amitmohanty9-Jul-05 18:17 
GeneralIn first time I draw, in the second, no. Pin
Alex Cutovoi9-Jul-05 6:21
Alex Cutovoi9-Jul-05 6:21 
GeneralRe: In first time I draw, in the second, no. Pin
Snowblind379-Jul-05 10:23
Snowblind379-Jul-05 10:23 
GeneralRe: In first time I draw, in the second, no. Pin
Alex Cutovoi10-Jul-05 5:21
Alex Cutovoi10-Jul-05 5:21 
GeneralNeed help using an abstract WebMethod Pin
Snowblind379-Jul-05 5:32
Snowblind379-Jul-05 5:32 
GeneralRe: Need help using an abstract WebMethod Pin
Member 20300389-Jul-05 9:05
Member 20300389-Jul-05 9:05 

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.