---
title: "Event Delegate in C#"  
description: "In this article, I’m explaining about the event and delegate in C#."  
author: "priyanka kushwaha"  
published: 2015-01-24  
updated: 2018-03-24  
canonical: https://www.mindstick.com/articles/1557/event-delegate-in-c-sharp  
category: ".net"  
tags: [".net"]  
reading_time: 1 minute  

---

# Event Delegate in C#

In this blog, I’m explaining about the event and [delegate in C#](https://www.mindstick.com/forum/202/event-delegate-in-c-sharp).\

## Definition of Delegate

A delegate is a type safe “[function](https://www.mindstick.com/articles/43970/purchase-suitable-wedding-dresses-for-your-wedding-function) pointers” that defines a method signature when you instantiate a delegate.

**Syntax:**

Delegate <return type> DelegateType (arg type,arg type)

Object

Delegate

[Multicast Delegate](https://www.mindstick.com/forum/33936/use-of-multicast-delegate-in-c-sharp)

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

## Types of Delegate

1. Single Delegate

2. Multicast Delegate

## Single Delegate

Single delegate can be used to invoke single method.

**Example**

```
namespace DelegateProgram{    public delegate void  ADelegate(int a);    partial class Operation    {         public void Square(int a)        {         Console.WriteLine(a*a);        }            }     class Program    {        static void Main(string[] args)        {            Operation obj = new Operation();            ADelegate objDele ;           objDele = obj.Square;                         objDele(20);            Console.ReadLine();         }    }}
```

## Multi Delegate

Multicast delegate can be used to invoke the multi method. Multicast Delegate use + [operator](https://www.mindstick.com/blog/144/union-intersection-and-except-operator-in-sql-server) and – operator for invoke.

**Example**

```
namespace DelegateProgram{    public delegate void  ADelegate(int a);    partial class Operation    {         public void Square(int a)        {         Console.WriteLine(a*a);        }        public void Add(int a)        {            Console.WriteLine(a + 10);        }    }     class Program    {        static void Main(string[] args)        {            Operation obj = new Operation();            ADelegate objDele ;           objDele = obj.Square;            objDele += obj.Add;              objDele(10);             objDele(20);         }    }}
```

---

Original Source: https://www.mindstick.com/articles/1557/event-delegate-in-c-sharp

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
