---
title: "Custom events in VB.Net"
url: "https://osherove.com/blog/2005/1/9/custom-events-in-vbnet.md"
canonical: "https://osherove.com/blog/2005/1/9/custom-events-in-vbnet.html"
published: "2005-01-09T01:20:00"
updated: "2005-01-09T01:20:00"
tags: [".Net Quotations"]
author: "Roy Osherove"
description: "I had a discussion going on with some folks regarding the fact that VB.Net does not have the equivalent of C# event accessors (the \"add\" and \"remove\" accessors you can declare inside an event declaration). We thought…"
usage: "Licensed under CC BY 4.0 — reuse, quote and adapt with attribution (Roy Osherove, link to the original page)."
license: "https://creativecommons.org/licenses/by/4.0/"
---

# Custom events in VB.Net

By Roy Osherove January 9, 2005 In [.Net Quotations](https://osherove.com/blog/category/net-quotations)

**Historical article** · Originally published January 9, 2005; technical details may be outdated.

I had a discussion going on with some [folks](http://weblogs.asp.net/jackieg) regarding the fact that VB.Net does not have the equivalent of C# event accessors (the "add" and "remove" accessors you can declare inside an event declaration).

We thought this wasn't possible until [Paul Vick blogged about the "Custom Event" declaration](http://www.panopticoncentral.net/archive/2004/08/06/1545.aspx) that will be available with VB.Net 2.0. That's really good news. Now you can handle various problems such as [non-serializaed events](http://www.lhotka.net/WeBlog/PermaLink.aspx?guid=8f8ae33f-f3b3-4864-a146-4f852d78783e) in a safer manner, or [use the EventHandlerList class](http://weblogs.asp.net/rosherove/archive/2004/12/31/344773.aspx) to manage many events in your class. Very Nice.

## More in .Net Quotations

[All posts in .Net Quotations](https://osherove.com/blog/category/net-quotations)

- Jan 11, 2005

    ### [Free online workshop - The .NET Assembly Loader (Fusion) - Internals and HOWTOs.](https://osherove.com/blog/2005/1/11/free-online-workshop-the-net-assembly-loader-fusion-internal.html)

- Jan 11, 2005

    ### [\[Free book\] .Net in samples](https://osherove.com/blog/2005/1/11/free-book-net-in-samples.html)

- Jan 8, 2005

    ### [\[Cool Tool\] XML Visualizer for Visual Studio .NET 2003](https://osherove.com/blog/2005/1/8/cool-tool-xml-visualizer-for-visual-studio-net-2003.html)

- Jan 8, 2005

    ### [Interesting ASP.NET (Hebrew) webcast coming up](https://osherove.com/blog/2005/1/8/interesting-aspnet-hebrew-webcast-coming-up.html)


---

## About the author

**Roy Osherove**: Senior Solutions Architect at AWS working on AI for production and AI-driven development; author of The Art of Unit Testing and Elastic Leadership, with about 20 years of consulting and training on unit testing, TDD, team leadership and continuous delivery.

### Sites

- [RobotPaper](https://robotpaper.ai/): This blog: AI patterns and anti-patterns, AI and coding agents, and engineering leadership.
- [osherove.com](https://osherove.com): Roy's personal site. Author of The Art of Unit Testing and Elastic Leadership; consulting and training on unit testing, TDD, team leadership and continuous delivery, plus about 20 years of blog posts.
- [The Art of Unit Testing](https://www.artofunittesting.com): The Art of Unit Testing, 3rd Edition (Manning): readable, maintainable, trustworthy unit tests, plus TDD workshops in C#, JavaScript, Java and Kotlin.
- [5whys.com](https://www.5whys.com): Roy's writing on software team leadership: self-organizing teams, surviving chaos, learning mode and the Elastic Leadership model.
- [Pipeline Driven](https://pipelinedriven.org): Continuous delivery and DevOps practices: build patterns, pipeline-friendly testing, DevOps metrics and enterprise DevOps.
- [Elastic Leadership](https://www.elasticleadership.com): Elastic Leadership, Roy's framework for software team leaders (survival, learning and self-organizing modes).

### Social

- X: https://x.com/royosherove
- LinkedIn: https://www.linkedin.com/in/osherove/

### Contact

- Contact form: https://forms.gle/jQSx5KoXvrVA1JCK7

### License

Licensed under CC BY 4.0 — reuse, quote and adapt with attribution (Roy Osherove, link to the original page). License: https://creativecommons.org/licenses/by/4.0/
