Delegates Articles

C# Delegates and Events

C# Delegates and events People often find it difficult to see the difference between events and delegates. C# doesn’t help matters by allowing you to declare field-like events which are automatically backed by a delegate variable of the same name. This article aims to clarify the matter for you. Another source of confusion is the […]

Read more

Creating Custom Delegates and Events in C#

Controls used on your forms have events that you can respond to with event handlers in your application. C# makes it easy to have the same behavior in other parts of your application by creating your own delegates and events, and raising the events based on your program logic. In this article we will examine […]

Read more

Delegates and Event Handling in C#

Introduction: This article will deal with Event anddelegates in C#. C# Open a new door by including the feature of EventDriven programming such as Events and Delegates. This article is partof the series that helps in understanding Events and Delegates. Events are the means by which WindowsApplication receive notification. In a Windows application a lot […]

Read more

7 Steps to Delegation Success

Sometimes you need to send data without knowing the caller of your class,here delegates and events come to rescue. This is a simple demonstration of the issue in 7 steps. The WindowsApplication1.Zip contain the whole project folder. Download WindowsApplication1.zip

Read more

C# Calculator Using Delegation

Here is the source code for a C# based calculator that uses delegation. using System;using System.Windows.Forms;using System.Drawing;using System.ComponentModel; namespace TestingDOTNET{ /// <summary> /// Summary description for Form1. /// </summary> public class Form1 : Form { private Button button; private TextBox screenbox; private String buttonLabel; private Label label; private double PreviousNumber; private double NextNumber; private double […]

Read more

Implementing Delegation-Event Model in C#, similar to that of Delegation-Event model of Java

It is next to impossible for any Java Developer to ignore .NET framework and C# language. C# is in many ways similar to Java. The best way for any Java Developer to learn C# wouldbe to start converting their small programs written in Java to C#. This is how I learnt about .NET framework and […]

Read more

Exploring C# Delegates

Delegates are a kind of type safe functionpointers which are actually declared as class derived fromSystem.MulticastDelegate. There are few rules how to write that class.First you must declare .ctor and Invoke methods, if you like to haveasynchronous callback involved there are two more methods just for thatcase BeginInvoke and EndInvoke. Except for these two or […]

Read more

C# Delegates

  System Requirement:Windows2000Microsoft .NET Framework Beta 2Internet Information Server (IIS 5.0)Visual Studio 7.0 Beta 2 Programming Language:C# Purpose:The purpose of this utility is to understand the following using .NET Framework:-What are Delegates-How to add COM object using Run time Interop services What are Delegates? We all are familiar with the functions. Weknow that they perform […]

Read more