Click here to Skip to main content
15,922,166 members
Home / Discussions / C#
   

C#

 
QuestionDataObject Modelling & Relational Presentation Pin
izakfick17-Sep-09 0:27
izakfick17-Sep-09 0:27 
QuestionRetrive rael hard disk serial number no volume Pin
meisamkhajezadeh17-Sep-09 0:20
meisamkhajezadeh17-Sep-09 0:20 
QuestionEmail verification not validation Pin
khosnur16-Sep-09 23:55
khosnur16-Sep-09 23:55 
AnswerRe: Email verification not validation Pin
musefan17-Sep-09 0:08
musefan17-Sep-09 0:08 
GeneralRe: Email verification not validation Pin
khosnur17-Sep-09 0:45
khosnur17-Sep-09 0:45 
AnswerRe: Email verification not validation Pin
Keith Barrow17-Sep-09 0:14
professionalKeith Barrow17-Sep-09 0:14 
GeneralRe: Email verification not validation Pin
khosnur17-Sep-09 0:47
khosnur17-Sep-09 0:47 
AnswerRe: Email verification not validation Pin
Arun Jacob17-Sep-09 0:19
Arun Jacob17-Sep-09 0:19 
GeneralRe: Email verification not validation Pin
khosnur17-Sep-09 0:49
khosnur17-Sep-09 0:49 
GeneralRe: Email verification not validation Pin
khosnur17-Sep-09 0:54
khosnur17-Sep-09 0:54 
AnswerRe: Email verification not validation Pin
Arun Jacob17-Sep-09 1:20
Arun Jacob17-Sep-09 1:20 
Questionhow to find websites that are using google ad-sense Pin
Anil Veeraghattapu 416-Sep-09 23:10
Anil Veeraghattapu 416-Sep-09 23:10 
AnswerRe: how to find websites that are using google ad-sense Pin
benjymous17-Sep-09 0:46
benjymous17-Sep-09 0:46 
GeneralRe: how to find websites that are using google ad-sense Pin
Anil Veeraghattapu 419-Sep-09 0:53
Anil Veeraghattapu 419-Sep-09 0:53 
GeneralRe: how to find websites that are using google ad-sense Pin
benjymous20-Sep-09 23:33
benjymous20-Sep-09 23:33 
Questionany way without cast [modified] Pin
mary_sa16-Sep-09 23:06
mary_sa16-Sep-09 23:06 
AnswerRe: no list my winservice at services Pin
Calla17-Sep-09 0:05
Calla17-Sep-09 0:05 
QuestionGeneric event triggering Pin
skbrann16-Sep-09 22:51
skbrann16-Sep-09 22:51 
Hi, I have a class that triggers two different events.

- EventA triggers an event with argument AEventArgs
- EventB triggers an event with argument BEventArgs

Code sample below.

My question is:
How can I create one generic function TriggerEvent(...) that replaces TriggerEventA(...) and TriggerEventB(...) ?


class Publisher
{
      public event EventHandler<AEventArgs> EventA;
      public event EventHandler<BEventArgs> EventB;
           
      public void TriggerEvents()
      {
            TriggerEventA(EventA, new AEventArgs());
            TriggerEventB(EventB, new BEventArgs());
      }

      private void TriggerEventA(EventHandler<AEventArgs> eventHandler, AEventArgs args)
      {
            EventHandler<AEventArgs> handler = eventHandler;
            if (handler != null)
            {
                  handler(this, args);
            }
      }

      private void TriggerEventB(EventHandler<BEventArgs> eventHandler, BEventArgs args)
      {
            EventHandler<BEventArgs> handler = eventHandler;
            if (handler != null)
            {
                  handler(this, args);
            }
      }
}

class AEventArgs : EventArgs
{
}

class BEventArgs : EventArgs
{
}
AnswerRe: Generic event triggering Pin
N a v a n e e t h17-Sep-09 3:00
N a v a n e e t h17-Sep-09 3:00 
GeneralRe: Generic event triggering Pin
skbrann20-Sep-09 21:49
skbrann20-Sep-09 21:49 
QuestionDll info Pin
mikla52116-Sep-09 22:30
mikla52116-Sep-09 22:30 
AnswerRe: Dll info Pin
Luc Pattyn17-Sep-09 2:46
sitebuilderLuc Pattyn17-Sep-09 2:46 
QuestionValidate java SAML signature from C# Pin
adrya16-Sep-09 21:57
adrya16-Sep-09 21:57 
AnswerRe: Validate java SAML signature from C# Pin
Mirko198016-Sep-09 23:02
Mirko198016-Sep-09 23:02 
GeneralRe: Validate java SAML signature from C# Pin
adrya16-Sep-09 23:25
adrya16-Sep-09 23:25 

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.