Code Repo    |     RSS
MD's Technical Sharing



Monday, March 16, 2009

Use the DefaultEvent attribute in .NET

The DefaultEvent attribute indicates a class's default event. If the class is a component and you double-click on it in a form, the code editor opens to this event.

VB.NET:
<DefaultEvent("Reorg")> _
Public Class Organization
Public Event Reorg()
End Class


C#:

[DefaultEvent("Reorg")]
public class Organization
{
….
}

Reference:

www.vb-helper.com/howto_net_default_event.html

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.