views:

40

answers:

1

Does anyone know the attributes or xml comments required to get the "new EventHandler(blah); (Press TAB to insert)" ability when you += an event?

Here are the two methods I've tried.

public EventHandler AnEvent;

public delegate void CustomEventHandler(object o, System.EventArgs e);
public CustomEventHandler AnotherEvent;

Neither seem to make intellisense show up. I'm sure I'm doing something wrong.

Nevermind, I forgot the "event" keyword.

+2  A: 

There are no XML comments or attributes which affect this process. It is a feature specific to C# events and should show up for them. Are you seeing a case where this is not showing up?

JaredPar
No, I've created a class that contains events but the intellisense (auto-tab insert) for them is not showing up. I figured there was something specific I needed to mark the event with in order to get it to work. The reasoning behind that is similar to the xml comments you need to use to get function documentation.
BuildStarted
@Morder, you shouldn't have to do anything special to get it to work other than declaring an event. Can you post some small repro code?
JaredPar
Sorry for wasting your time, JaredPar. I just realized I forgot the "event" keyword.
BuildStarted
@Morder, no worries. Glad you figured out the issue.
JaredPar