Click here to Skip to main content
15,890,506 members
Home / Discussions / C#
   

C#

 
GeneralRe: String Reversal plus character replacement Pin
BREdwards25-Jan-08 17:31
BREdwards25-Jan-08 17:31 
GeneralRe: String Reversal plus character replacement Pin
DaveyM6925-Jan-08 22:00
professionalDaveyM6925-Jan-08 22:00 
GeneralRe: String Reversal plus character replacement Pin
DaveyM6925-Jan-08 22:40
professionalDaveyM6925-Jan-08 22:40 
GeneralRe: String Reversal plus character replacement Pin
BREdwards26-Jan-08 17:42
BREdwards26-Jan-08 17:42 
QuestionOval buttons and using transparency Pin
MikeWeber25-Jan-08 10:55
MikeWeber25-Jan-08 10:55 
GeneralRe: Oval buttons and using transparency Pin
DaveyM6925-Jan-08 12:52
professionalDaveyM6925-Jan-08 12:52 
GeneralRe: Oval buttons and using transparency Pin
mav.northwind25-Jan-08 21:55
mav.northwind25-Jan-08 21:55 
QuestionCan I raise an event for a class rather than an object? Pin
Clive D. Pottinger25-Jan-08 7:42
Clive D. Pottinger25-Jan-08 7:42 
I have object A, operating in the program's main thread, which creates several copies of object B (B1, B2, etc) and executes them in several threads.

I have figured out how to get A to raise a custom event that B2 should deal with. Since A knows all about the objects it created, it simply calls B2.OnBEvent().

However, I now want a B object (say B3) to raise an event for A to deal with. B3 does not know about the object A (no reference to A has been passed to B3), so it can't call A.OnAEvent().

My question is, can I declare an OnAEvent() method to be static, so that B3 does not have to know about object A? Can I call ClassA.OnAEvent() and have that event handled by object A?

BTW: in the on-going conflict between how threading is done and how Clive Pottinger thinks threading is done, the score now stands at 43 - 0.

Clive Pottinger
Victoria, BC

GeneralRe: Can I raise an event for a class rather than an object? Pin
Ed.Poore25-Jan-08 7:45
Ed.Poore25-Jan-08 7:45 
GeneralRe: Can I raise an event for a class rather than an object? Pin
Clive D. Pottinger25-Jan-08 10:19
Clive D. Pottinger25-Jan-08 10:19 
GeneralRe: Can I raise an event for a class rather than an object? Pin
Ed.Poore25-Jan-08 12:18
Ed.Poore25-Jan-08 12:18 
AnswerRe: Can I raise an event for a class rather than an object? Pin
BoneSoft25-Jan-08 8:16
BoneSoft25-Jan-08 8:16 
GeneralRe: Can I raise an event for a class rather than an object? Pin
Clive D. Pottinger25-Jan-08 10:50
Clive D. Pottinger25-Jan-08 10:50 
GeneralRe: Can I raise an event for a class rather than an object? Pin
BoneSoft25-Jan-08 12:12
BoneSoft25-Jan-08 12:12 
GeneralRe: Can I raise an event for a class rather than an object? Pin
Clive D. Pottinger1-Apr-08 11:13
Clive D. Pottinger1-Apr-08 11:13 
GeneralRe: Can I raise an event for a class rather than an object? Pin
BoneSoft1-Apr-08 13:06
BoneSoft1-Apr-08 13:06 
GeneralRe: Can I raise an event for a class rather than an object? Pin
Ennis Ray Lynch, Jr.25-Jan-08 8:20
Ennis Ray Lynch, Jr.25-Jan-08 8:20 
GeneralRe: Can I raise an event for a class rather than an object? Pin
led mike25-Jan-08 8:27
led mike25-Jan-08 8:27 
QuestionWhats the correct way to populate the DataSource in SubReports? [modified] Pin
DeepToot25-Jan-08 7:31
DeepToot25-Jan-08 7:31 
QuestionDeploy a web service Pin
usermans25-Jan-08 6:13
usermans25-Jan-08 6:13 
GeneralRe: Deploy a web service Pin
led mike25-Jan-08 6:48
led mike25-Jan-08 6:48 
Generalimage transparent Pin
netJP12L25-Jan-08 5:34
netJP12L25-Jan-08 5:34 
GeneralRe: image transparent Pin
Ennis Ray Lynch, Jr.25-Jan-08 6:25
Ennis Ray Lynch, Jr.25-Jan-08 6:25 
GeneralRe: image transparent Pin
netJP12L25-Jan-08 9:28
netJP12L25-Jan-08 9:28 
GeneralRe: image transparent Pin
Ennis Ray Lynch, Jr.25-Jan-08 9:33
Ennis Ray Lynch, Jr.25-Jan-08 9:33 

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.