Click here to Skip to main content
15,896,557 members
Home / Discussions / C#
   

C#

 
GeneralRe: Memory leak Pin
Luc Pattyn8-Apr-07 7:08
sitebuilderLuc Pattyn8-Apr-07 7:08 
GeneralRe: Memory leak Pin
HexaDeveloper8-Apr-07 7:12
HexaDeveloper8-Apr-07 7:12 
GeneralRe: Memory leak [modified] Pin
Luc Pattyn8-Apr-07 11:21
sitebuilderLuc Pattyn8-Apr-07 11:21 
GeneralRe: Memory leak Pin
HexaDeveloper8-Apr-07 12:43
HexaDeveloper8-Apr-07 12:43 
GeneralRe: Memory leak Pin
Luc Pattyn8-Apr-07 13:05
sitebuilderLuc Pattyn8-Apr-07 13:05 
QuestionGet Controls by name Pin
swjam4-Apr-07 5:03
swjam4-Apr-07 5:03 
AnswerRe: Get Controls by name Pin
B.King4-Apr-07 5:50
B.King4-Apr-07 5:50 
QuestionHow to specify an event handler Pin
peterchen4-Apr-07 5:02
peterchen4-Apr-07 5:02 
If I have a class with an event, and a class that wants to attach to the handler:

class A
{
  public event EventHandler<SomeEventArgs> SomeEvent;
}

class B
{
  public void AttachToHandler(A a)
  {
    a.SomeEvent += ***;  // << here's my question
  }
   
  void SomeEventHandler(object sender, SomeEventArgs e) {... }
 
}


The VC# Express IDE ("press TAB to insert..") suggests:

a.SomeEvent += new EventHandler<SomeEventArgs>(SomeEventHandler);


However, the following also seems to work:

a.SomeEvent += SomeEventHandler;


Now the questions:
Is there a difference between the two? A "preferred style"?



We are a big screwed up dysfunctional psychotic happy family - some more screwed up, others more happy, but everybody's psychotic joint venture definition of CP
My first real C# project | Linkify!|FoldWithUs! | sighist

AnswerRe: How to specify an event handler Pin
mikanu4-Apr-07 6:48
mikanu4-Apr-07 6:48 
QuestionMulti-select ComboBox Pin
Amatista4-Apr-07 4:46
Amatista4-Apr-07 4:46 
AnswerRe: Multi-select ComboBox Pin
Douglas Troy4-Apr-07 6:00
Douglas Troy4-Apr-07 6:00 
GeneralRe: Multi-select ComboBox Pin
Amatista4-Apr-07 22:27
Amatista4-Apr-07 22:27 
GeneralRe: Multi-select ComboBox Pin
Douglas Troy5-Apr-07 5:34
Douglas Troy5-Apr-07 5:34 
GeneralRe: Multi-select ComboBox Pin
Amatista10-Apr-07 2:27
Amatista10-Apr-07 2:27 
QuestionControl Draw delay on resize (Getting rid of it) Pin
Muntyness4-Apr-07 3:11
Muntyness4-Apr-07 3:11 
AnswerRe: Control Draw delay on resize (Getting rid of it) Pin
Stanciu Vlad4-Apr-07 7:52
Stanciu Vlad4-Apr-07 7:52 
QuestionMSI uninstall problems Pin
Vadim G.4-Apr-07 2:53
Vadim G.4-Apr-07 2:53 
AnswerRe: MSI uninstall problems Pin
Douglas Troy4-Apr-07 3:51
Douglas Troy4-Apr-07 3:51 
GeneralRe: MSI uninstall problems Pin
Vadim G.4-Apr-07 4:44
Vadim G.4-Apr-07 4:44 
Questionbind list with datagrid & textbox Pin
merwa4-Apr-07 2:43
merwa4-Apr-07 2:43 
AnswerRe: bind list with datagrid & textbox Pin
Not Active4-Apr-07 3:24
mentorNot Active4-Apr-07 3:24 
QuestionProblem Displaying moneyfield in gridview Pin
Bubbles24-Apr-07 1:56
Bubbles24-Apr-07 1:56 
AnswerRe: Problem Displaying moneyfield in gridview Pin
kubben4-Apr-07 2:31
kubben4-Apr-07 2:31 
AnswerRe: Problem Displaying moneyfield in gridview Pin
Hayder Marzouk4-Apr-07 2:33
Hayder Marzouk4-Apr-07 2:33 
GeneralRe: Problem Displaying moneyfield in gridview Pin
Bubbles24-Apr-07 3:11
Bubbles24-Apr-07 3:11 

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.