Click here to Skip to main content
15,887,248 members
Home / Discussions / C#
   

C#

 
GeneralRe: How to load a referenced dll from specified location not GAC? [modified] Pin
PIEBALDconsult13-Aug-10 3:10
mvePIEBALDconsult13-Aug-10 3:10 
QuestionArrays and Classes Pin
dluurs12-Aug-10 15:22
dluurs12-Aug-10 15:22 
AnswerRe: Arrays and Classes Pin
Luc Pattyn12-Aug-10 15:33
sitebuilderLuc Pattyn12-Aug-10 15:33 
GeneralRe: Arrays and Classes Pin
PIEBALDconsult12-Aug-10 17:48
mvePIEBALDconsult12-Aug-10 17:48 
AnswerRe: Arrays and Classes Pin
Richard MacCutchan12-Aug-10 22:43
mveRichard MacCutchan12-Aug-10 22:43 
QuestionListBox SelectedValueChanged firing twice Pin
Pete Burkindine12-Aug-10 11:56
Pete Burkindine12-Aug-10 11:56 
AnswerRe: ListBox SelectedValueChanged firing twice Pin
Luc Pattyn12-Aug-10 12:37
sitebuilderLuc Pattyn12-Aug-10 12:37 
GeneralRe: ListBox SelectedValueChanged firing twice Pin
Pete Burkindine13-Aug-10 4:56
Pete Burkindine13-Aug-10 4:56 
I looked into this some more...

Apparently the information I'd read about the event firing twice was false or out of date Sniff | :^) I did a simplified test, and the event only fires once, with the new selected value(s)/index/indices. All the extra events are actually being triggered in my program (for reasons that make sense depending on context).

The event handler had logic in its header to prevent it from firing in certain scenarios where I knew the program would be making too many calls that would change the index (in particular, refreshing the databinding). I realized the current selection was already being stored in a static var, and just added to the short-circuit logic a test: selectedvalue = staticVar --> quick_exit

Works like a charm; the condition is true after the initial pass sets the static var.

Thanks for your help; looking at the selectedindex vals helped me figure out what was happening.
GeneralRe: ListBox SelectedValueChanged firing twice Pin
Luc Pattyn13-Aug-10 5:08
sitebuilderLuc Pattyn13-Aug-10 5:08 
QuestionStreamWriter disposed before call to Close() in destructor Pin
dene9997012-Aug-10 10:55
dene9997012-Aug-10 10:55 
AnswerRe: StreamWriter disposed before call to Close() in destructor Pin
Ennis Ray Lynch, Jr.12-Aug-10 11:06
Ennis Ray Lynch, Jr.12-Aug-10 11:06 
AnswerRe: StreamWriter disposed before call to Close() in destructor Pin
Luc Pattyn12-Aug-10 11:27
sitebuilderLuc Pattyn12-Aug-10 11:27 
AnswerRe: StreamWriter disposed before call to Close() in destructor Pin
DaveyM6912-Aug-10 21:25
professionalDaveyM6912-Aug-10 21:25 
QuestionForeach cannot operate on a 'method group'. Did you intend to invoke the 'method group'? Pin
Tichaona J12-Aug-10 7:35
Tichaona J12-Aug-10 7:35 
AnswerRe: Foreach cannot operate on a 'method group'. Did you intend to invoke the 'method group'? Pin
Luc Pattyn12-Aug-10 7:54
sitebuilderLuc Pattyn12-Aug-10 7:54 
AnswerRe: Foreach cannot operate on a 'method group'. Did you intend to invoke the 'method group'? Pin
Ian Shlasko12-Aug-10 7:55
Ian Shlasko12-Aug-10 7:55 
AnswerRe: Foreach cannot operate on a 'method group'. Did you intend to invoke the 'method group'? Pin
Luc Pattyn12-Aug-10 8:10
sitebuilderLuc Pattyn12-Aug-10 8:10 
GeneralRe: Foreach cannot operate on a 'method group'. Did you intend to invoke the 'method group'? Pin
Ian Shlasko12-Aug-10 8:24
Ian Shlasko12-Aug-10 8:24 
GeneralRe: Foreach cannot operate on a 'method group'. Did you intend to invoke the 'method group'? Pin
Luc Pattyn12-Aug-10 8:57
sitebuilderLuc Pattyn12-Aug-10 8:57 
GeneralRe: Foreach cannot operate on a 'method group'. Did you intend to invoke the 'method group'? Pin
AspDotNetDev12-Aug-10 7:56
protectorAspDotNetDev12-Aug-10 7:56 
GeneralRe: Foreach cannot operate on a 'method group'. Did you intend to invoke the 'method group'? Pin
Tichaona J12-Aug-10 9:16
Tichaona J12-Aug-10 9:16 
GeneralRe: Foreach cannot operate on a 'method group'. Did you intend to invoke the 'method group'? Pin
Tichaona J12-Aug-10 11:01
Tichaona J12-Aug-10 11:01 
AnswerRe: Foreach cannot operate on a 'method group'. Did you intend to invoke the 'method group'? Pin
Luc Pattyn12-Aug-10 11:28
sitebuilderLuc Pattyn12-Aug-10 11:28 
QuestionHow to update text (winform) from different thread ? ( What wrong with my code ?! ) Pin
Yanshof12-Aug-10 5:59
Yanshof12-Aug-10 5:59 
AnswerRe: How to update text (winform) from different thread ? ( What wrong with my code ?! ) Pin
AspDotNetDev12-Aug-10 8:02
protectorAspDotNetDev12-Aug-10 8:02 

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.