---
title: "Events in c#"  
description: "An event is delivered to an object by means of a call to amethod in that object.&nbsp; An event isdelegate type class member that is used by the objec"  
author: "Amit Singh"  
published: 2011-01-25  
updated: 2026-05-12  
canonical: https://www.mindstick.com/blog/102/events-in-c-sharp  
category: "c#"  
tags: ["c#"]  
reading_time: 2 minutes  

---

# Events in c#

An event is delivered to an object by means of a call to amethod in that object. An event isdelegate type class member that is used by the object or class and it provide anotification to other [objects](https://www.mindstick.com/forum/145447/what-are-objects) that an event has occurred.

We [define](https://yourviews.mindstick.com/audio/1110/lifestyles-choices-that-define-our-lives) the event as

modifiers event type NameOfEvent

Where modifiersmay be [access modifiers](https://www.mindstick.com/articles/338838/explain-access-modifiers-in-java) like public, protected, [private](https://www.mindstick.com/blog/11097/java-access-modifiers-the-public-and-the-private-modifiers) etc.

event is keywordwhich shows the name of event.

type shows theevent declaration which is the name of [delegate](https://www.mindstick.com/articles/777/delegate-and-event-in-c-sharp).

And NameOfEventis a variable.

For example:

Public event showEventshow;

Where showEventis delegates and show is event.

Note: Event isthe part of delegate so first we define the delegate for that event and theninstance of delegate by using [keyword](https://www.mindstick.com/forum/33572/sql-inner-join-keyword) event.

How use an [event handler](https://www.mindstick.com/forum/1371/c-sharp-dot-net-event-handler-delegate-question)

In this example how we implement the event handler

Example:

```cs
namespacesampleEvent
{
    //declaration thedelegate here
    public delegate void showName (stringstr);
    class zzz
    {
        //declarationof event
        public event showNameshow;
        public void tEvent()
        {
            if(show != null)
                show("checkthe event");
        }
    }
    class Program
    {
        static void Main(string[]args)
        {
            zzzz = new zzz();
            Programp = new Program();
            z.show+=newshowName(p.z_show);
            z.tEvent();
        }
        public void z_show(stringstr)
        {
            Console.WriteLine(str);
            Console.ReadLine();
        }
    }}
```

**[Output](https://www.mindstick.com/forum/161319/how-does-the-print-function-handle-output-in-python):**

check the event

---

Original Source: https://www.mindstick.com/blog/102/events-in-c-sharp

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
