Click here to Skip to main content
15,895,801 members
Home / Discussions / C#
   

C#

 
GeneralRe: Execute smtpclient authenticate method from reflection? Pin
SeMartens27-Jan-10 0:31
SeMartens27-Jan-10 0:31 
GeneralRe: Execute smtpclient authenticate method from reflection? Pin
ankit_verma27-Jan-10 0:40
ankit_verma27-Jan-10 0:40 
Questioniterating listview Pin
Member 59031026-Jan-10 22:37
Member 59031026-Jan-10 22:37 
AnswerRe: iterating listview Pin
sanforjackass26-Jan-10 22:47
sanforjackass26-Jan-10 22:47 
AnswerRe: iterating listview Pin
Rob Philpott26-Jan-10 22:54
Rob Philpott26-Jan-10 22:54 
Questioninserting item into list box Pin
tanweer26-Jan-10 22:03
tanweer26-Jan-10 22:03 
AnswerRe: inserting item into list box Pin
Harvey Saayman26-Jan-10 22:19
Harvey Saayman26-Jan-10 22:19 
AnswerRe: inserting item into list box Pin
OriginalGriff26-Jan-10 22:25
mveOriginalGriff26-Jan-10 22:25 
No, it won't.

Problems:
1) You are looping round exactly as many times as there are characters in the textbox, rather than the number of times there are items in the list.
2) You are comparing the list item with a single character.

Try:
1) using the codeblock widget to preserve your formatting when you post code fragments - it make it easier to read, and thus understand.
2) using foreach(ListBoxItem lbi in list1) instead of a for loop.
3) using ListBox.Contains instead of the loop at all!

All those who believe in psycho kinesis, raise my hand.

My Badger | [badger,badger,badger,badger...] 's gonna unleash hell on your ass. Badger | [badger,badger,badger,badger...] tastic!

QuestionCant access the menu item Pin
Muammar©26-Jan-10 21:46
Muammar©26-Jan-10 21:46 
AnswerRe: Cant access the menu item Pin
OriginalGriff26-Jan-10 22:01
mveOriginalGriff26-Jan-10 22:01 
GeneralRe: Cant access the menu item Pin
Muammar©27-Jan-10 1:11
Muammar©27-Jan-10 1:11 
GeneralRe: Cant access the menu item Pin
OriginalGriff27-Jan-10 1:34
mveOriginalGriff27-Jan-10 1:34 
GeneralRe: Cant access the menu item Pin
Muammar©27-Jan-10 3:16
Muammar©27-Jan-10 3:16 
GeneralRe: Cant access the menu item Pin
Muammar©27-Jan-10 3:32
Muammar©27-Jan-10 3:32 
QuestionCrystal Report Pin
mjawadkhatri26-Jan-10 21:41
mjawadkhatri26-Jan-10 21:41 
Questionget files one by one in the lable Pin
tanweer26-Jan-10 21:31
tanweer26-Jan-10 21:31 
AnswerRe: get files one by one in the lable Pin
sanforjackass26-Jan-10 21:40
sanforjackass26-Jan-10 21:40 
GeneralRe: get files one by one in the lable Pin
tanweer26-Jan-10 21:55
tanweer26-Jan-10 21:55 
GeneralRe: get files one by one in the lable Pin
sanforjackass26-Jan-10 21:59
sanforjackass26-Jan-10 21:59 
GeneralRe: get files one by one in the lable Pin
tanweer26-Jan-10 22:05
tanweer26-Jan-10 22:05 
GeneralRe: get files one by one in the lable Pin
sanforjackass26-Jan-10 22:18
sanforjackass26-Jan-10 22:18 
GeneralRe: get files one by one in the lable Pin
OriginalGriff26-Jan-10 22:10
mveOriginalGriff26-Jan-10 22:10 
Questiondatagridview scrolling Pin
prithaa26-Jan-10 20:26
prithaa26-Jan-10 20:26 
QuestionEventHandler for Textbox Pin
Anu_Bala26-Jan-10 20:21
Anu_Bala26-Jan-10 20:21 
QuestionThread issue Pin
Mycroft Holmes26-Jan-10 18:50
professionalMycroft Holmes26-Jan-10 18:50 

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.