---
title: "What is Delegate?"  
description: "What is Delegate?"  
author: "Anonymous User"  
published: 2018-03-25  
updated: 2020-09-19  
canonical: https://www.mindstick.com/interview/23366/what-is-delegate  
category: "c#"  
tags: ["c#"]  
reading_time: 2 minutes  

---

# What is Delegate?

**A delegate is a type safe function pointer. That is it holds a reference or pointer to a method.**

The signature of the delegate must watch the signature of the function. The delegate points to, otherwise you get a compiler eroor, that is the reason delegates are called as type safe function pointer. It is just like a class. we can create an instance of it. And when you do so, you pass in the function name as a parameter to the delegate constructor and it is to this function the delegate will point to.

## you can declare delegate like this

## C#

```
public delegate int PerformCalculation(int x, int y);
```

## Answers

### Answer by Anonymous User

**A delegate is a type safe function pointer. That is it holds a reference or pointer to a method.**

The signature of the delegate must watch the signature of the function. The delegate points to, otherwise you get a compiler eroor, that is the reason delegates are called as type safe function pointer. It is just like a class. we can create an instance of it. And when you do so, you pass in the function name as a parameter to the delegate constructor and it is to this function the delegate will point to.

## you can declare delegate like this

## C#

```
public delegate int PerformCalculation(int x, int y);
```


---

Original Source: https://www.mindstick.com/interview/23366/what-is-delegate

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
