---
title: "How to Callback Operation Using Delegate in c#."  
description: "How to Callback Operation Using Delegate in c#."  
author: "Anonymous User"  
published: 2016-01-24  
updated: 2016-01-24  
canonical: https://www.mindstick.com/forum/33917/how-to-callback-operation-using-delegate-in-c-sharp  
category: "c#"  
tags: ["c#"]  
reading_time: 1 minute  

---

# How to Callback Operation Using Delegate in c#.

I want to use [Callback](https://www.mindstick.com/articles/152/using-the-callback) [Operation](https://answers.mindstick.com/qa/41817/what-was-one-of-the-official-goals-of-operation-iraqi-freedom-in-2003) Using [Delegate in c#](https://www.mindstick.com/forum/33936/use-of-multicast-delegate-in-c-sharp). How to do this please help me.

## Replies

### Reply by Anonymous User

call back design pattern executable code is passed as an argument to other code and it is expected to call back at some time.

```
using System;using System.Collections.Generic;using System.Data.Entity;using System.Linq;namespace program{    class Example    {        static void Main(string[] args)        {            CallBackdemo callBackdemo = new CallBackdemo();            callBackdemo.Test();            Console.ReadLine();        }    }    public class CallBackdemo    {        public void Test()        {            TaskCompletedCallBack callback = TestCallBack;            CallBack testCallBack = new CallBack();            testCallBack.NewTask(callback);        }        public void TestCallBack(string result)        {            Console.WriteLine(result);        }    }    public delegate void TaskCompletedCallBack(string Result);    public class CallBack    {        public void NewTask(TaskCompletedCallBack taskCompletedCallBack)        {            Console.WriteLine("I have started new execution Task.");            if (taskCompletedCallBack != null)                taskCompletedCallBack("I have completed execution Task.");        }    }}
```

![How to Callback Operation Using Delegate in c#.](https://www.mindstick.com/mindstickforums/ba427645-cd37-492a-971e-194e31197052/images/1a934c28-a85c-4635-a429-23efaba84605.png)


---

Original Source: https://www.mindstick.com/forum/33917/how-to-callback-operation-using-delegate-in-c-sharp

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
