Click here to Skip to main content
15,886,919 members
Home / Discussions / C#
   

C#

 
QuestionRead strings between delimiters Pin
kani9821-Apr-06 11:28
kani9821-Apr-06 11:28 
AnswerRe: Read strings between delimiters Pin
Ravi Bhavnani21-Apr-06 11:31
professionalRavi Bhavnani21-Apr-06 11:31 
AnswerRe: Read strings between delimiters Pin
Guffa21-Apr-06 12:55
Guffa21-Apr-06 12:55 
AnswerRe: Read strings between delimiters Pin
sujithkumarsl22-Apr-06 16:47
sujithkumarsl22-Apr-06 16:47 
QuestionHaving a max line count in a list control Pin
BambooMoon21-Apr-06 11:25
BambooMoon21-Apr-06 11:25 
AnswerRe: Having a max line count in a list control Pin
Ravi Bhavnani21-Apr-06 11:30
professionalRavi Bhavnani21-Apr-06 11:30 
QuestionObserver Pattern Pin
martin_hughes21-Apr-06 11:07
martin_hughes21-Apr-06 11:07 
AnswerRe: Observer Pattern Pin
Ravi Bhavnani21-Apr-06 11:26
professionalRavi Bhavnani21-Apr-06 11:26 
Utini wrote:
is this an example of the Observer pattern as implemented in C#?


Yes, it is. A few points that may be worth mentioning:
  • Observers can attach themselves by chaining a listening delegate to BarcodeScanner or implementing an IBarcodeScannerListener interface and attaching themselves by calling an BarcodeScanner.addListener() method. Delegates offer more flexibility in that the observer can supply any (valid) listening method at run time. I find the latter method meets my needs as it clearly indicates that a class is an observer of BarcodeScanner events.

  • As with any listener, you need to be careful of cross thread calls (if BarcodeScanner is running in a separate thread). See the doc on BeginInvoke() and EndInvoke() for more information.

  • Because listeners will typically block execution of BarcodeScanner, you should ensure that the listener method is lightweight.
/ravi

My new year's resolution: 2048 x 1536
Home | Music | Articles | Freeware | Trips
ravib(at)ravib(dot)com

GeneralRe: Observer Pattern Pin
martin_hughes21-Apr-06 11:51
martin_hughes21-Apr-06 11:51 
General64 bit / IME / WindowsHook problem Pin
Daniel Grunwald21-Apr-06 10:11
Daniel Grunwald21-Apr-06 10:11 
GeneralRe: 64 bit / IME / WindowsHook problem Pin
LongRange.Shooter21-Apr-06 15:02
LongRange.Shooter21-Apr-06 15:02 
GeneralRe: 64 bit / IME / WindowsHook problem Pin
Daniel Grunwald22-Apr-06 2:06
Daniel Grunwald22-Apr-06 2:06 
QuestionSwitching from DG tp DGV !!!???!!!???!!!??? Pin
mrkeivan21-Apr-06 9:44
mrkeivan21-Apr-06 9:44 
AnswerRe: Switching from DG tp DGV !!!???!!!???!!!??? Pin
Josh Smith21-Apr-06 10:04
Josh Smith21-Apr-06 10:04 
QuestionHow to find what file/s was selected by mouse? Pin
FocusedWolf21-Apr-06 8:35
FocusedWolf21-Apr-06 8:35 
AnswerRe: How to find what file/s was selected by mouse? Pin
Paul Brower21-Apr-06 10:14
Paul Brower21-Apr-06 10:14 
AnswerRe: How to find what file/s was selected by mouse? Pin
John C. Doe21-Apr-06 14:09
John C. Doe21-Apr-06 14:09 
AnswerRe: How to find what file/s was selected by mouse? Pin
John C. Doe21-Apr-06 14:11
John C. Doe21-Apr-06 14:11 
QuestionUsing CollectionBase Pin
JuanAlbertoMD21-Apr-06 8:06
JuanAlbertoMD21-Apr-06 8:06 
AnswerRe: Using CollectionBase Pin
Josh Smith21-Apr-06 10:09
Josh Smith21-Apr-06 10:09 
QuestionHow to add textbox or combobox to toolbar Pin
pliu_200021-Apr-06 7:40
pliu_200021-Apr-06 7:40 
AnswerRe: How to add textbox or combobox to toolbar Pin
Ravi Bhavnani21-Apr-06 8:13
professionalRavi Bhavnani21-Apr-06 8:13 
QuestionEnumerating CD/DVD Drives Pin
Joel Holdsworth21-Apr-06 6:34
Joel Holdsworth21-Apr-06 6:34 
AnswerRe: Enumerating CD/DVD Drives Pin
Paul Brower21-Apr-06 7:38
Paul Brower21-Apr-06 7:38 
QuestionCreating, Showing, Returning values with Windows Forms. Pin
RanvA21-Apr-06 6:26
RanvA21-Apr-06 6:26 

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.