Events Articles

C# Events Lesson 2: Passing data to a consumer

In the previous lesson we created an event andconsumed it. In doing so you probably noticed that our code would havebeen a little better if we could have determined whether or not thefile actually existed. We could then provide more information to theuser and make our code a bit more useful. In this example we […]

Read more
Uncategorized

C# Events: Lesson 1

The ability to fire an event is core to mostWindows development projects. Events are useful for updating a userinterface with changed data, or causing a piece of code to run afteranother piece of code has completed. .NET has brought us a powerfulmodel for programming events. In this lesson we will write a smallapplication that will […]

Read more
Uncategorized

Event Handling in C#: Custom event Handlers

To illustrate event handling we will make a news service that notifies its subscribers whenever an event (new news) occurs. Subscribers can unsubscribe and subscribe at will. The delegate: The delegate lets the subscriber know what type method can be notified. Essentially, the news service says “In case of an event occurring, I’ll notify any […]

Read more
Uncategorized

Custom Event Handlers in C#

To illustrate event handling we will make a news service that notifies its subscribers whenever an event (new news) occurs. Subscribers can unsubscribe and subscribe at will.   The delegate:The delegate lets the subscriber know what type method can be notified. Essentially, the news service says “In case of an event occurring, I’ll notify any […]

Read more
Uncategorized

C# Event Controls

This article will explain how to declare anduse the C# Events in your application as Event Control. You can designyour event control in couple of minutes, making your Event as controlwill be easy for GUI developer to implement Events in Client side. Here are the steps:1) Create one windows application Project2) Add "Component Class" using […]

Read more
Uncategorized

C# Sessions and Their Events

Session and its events are sometimes peculiarat best and down right complex at worst. This is necessary because ofthe need to service different state providers. I examine some of theseissues which may help explain why session end and session start eventsdon?t always seem to fire as a couple. The glue which holds the matrix together […]

Read more
Uncategorized

Ready C# Events

Each event has a type.Let's take the event Click. The type of the event Click is EventHandler and both event and its type are defined fortunatelly in .NET Framework. We only have to keep in mind that Click IS an event of type EventHandler (whatever this means). And here is the good news : We […]

Read more
Uncategorized

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
Uncategorized

.NET Event Handling using the Template Method Design Pattern

  Environment: .NET, C#, Visual Basic .NET, Windows 2000, Windows XP, Windows NT4 SP6a Microsoft .NET event handling, in common with typical object-orientedframeworks, is implemented using the well-known Observer design pattern. (See the book, Design Patterns, by Gamma et al.,Addison-Wesley, 1995, pp325-330). This article describes how to enhance .NETevent handling with the Template Method design […]

Read more
Uncategorized

C# Events

An event is defined in C# as ‘a member that enables an object or class to provide notifications’. Now, let us seein detail what an event is and how notifications are provided in C#.In an application, the change in status (or certain properties) of an object may result in some actions to be performed. For […]

Read more
Uncategorized
  • Page 1 of 2
  • 1
  • 2
  • >