Search   Articles   Dev Forums   Personalize   Favorites   Member Login   ASP.Net Hosting
DevASP.NET for ASP.NET, VB.NET, XML and C# (C-Sharp) Developers Sunday, November 23, 2008

Dev Articles
Search Directory
ASP.NET
VB.Net
C-Sharp
SQL Server
 
FREE 12 month online training for ASP.NET & MS Expression Studio and a Free copy of MS Expression Web with Windows Server Purchase

Home > Search > Articles & Samples > C-Sharp > Events & Delegates
Search:
What's New - What's Hot


Programming Events of the Framework Class Libraries        
Total Hits: 53  |  Today: 0 Author: Ted Pattison       Rating:  
Read Reviews | Write Review |   Your Rating: 

This month's installment represents the final column in a series of three focusing on programming events. In the previous two columns, I showed you how to define and raise events (see Basic Instincts: Programming with Events Using .NET and Basic Instincts: Static Event Binding Using WithEvents). I also explained how to wire up event handlers using both dynamic and static event binding. This month I am going to conclude my coverage of events by showing some practical examples of handling some of ...

Fast late-bound invocation through DynamicMethod delegates        
Total Hits: 38  |  Today: 0 Author: Alessandro Febretti       Rating:  
Read Reviews | Write Review |   Your Rating: 

Reflection is a feature that allows a program to find out type (and metadata) information about objects at run-time. Programs written in languages that support Reflection, like Java and the CLR languages family (C#, Visual Basic .NET etc.) can inspect types, obtain detailed information about class members, dynamically instantiate classes and invoke methods at run-time. The .NET Framework exposes its reflection services through the System.Reflection namespace. Late-bound invocation, for instance,...

Delegates and Business Objects        
Total Hits: 36  |  Today: 0 Author: Paul Stovell       Rating:  
Read Reviews | Write Review |   Your Rating: 

The aim of this article is to give you an understanding of how I perform business object validation in Trial Balance, a personal accounting project of mine. This article was originally a blog post that featured on my website, which you can see here. My approach borrows largely from the technique published in Rocky Lhotka's Expert Business Objects book (don't worry if you haven't read it), but I've added a Stovellian twist to spice things up. I'm also going to detour into a discussion of IDataErr...

An Introduction to Delegates        
Total Hits: 48  |  Today: 0 Author: Jeffrey Richter       Rating:  
Read Reviews | Write Review |   Your Rating: 

Callback functions are certainly one of the most useful pro-gramming mechanisms ever created. The C runtime's qsort function takes a callback function to sort elements within an array. In Windows, callback functions are required for window procedures, hook procedures, asynchronous procedure calls, and more. In the Microsoft® .NET Framework, callback methods are used for a whole slew of things. You can register callback methods to get assembly load/unload notifications, unhandled exception notifi...

Dot Net Remoting: Handling Remote Events using Delegates – a real world example of 'chat and file send' application        
Total Hits: 259  |  Today: 1 Author: josekonoor.       Rating:  
Read Reviews | Write Review |   Your Rating: 

Dot Net Remoting is a simple programming model/framework which allows objects from different machines/processes/app-domains to communicate each other. It allows the flexibility of using different types of communication protocols (tcp, http etc..) and message formatters (binary, SOAP etc..). Communication among different app-domains is facilitated by Remoting objects. Remoting objects can be hosted using Managed Executables/IIS/.Net Component Services. It is also possible for .Net applications ru...

Delegates And Events - The Uncensored Story        
Total Hits: 55  |  Today: 0 Author: Salman Ahmed       Rating:  
Read Reviews | Write Review |   Your Rating: 

All of us have been exposed to event driven programming of some sort or the other. C# adds on value to the often mentioned world of event driven programming by adding support through events and delegates. This article is a part of a series that aims at understanding fully the way in which delegates and events operate. Part1 helps you understand the role of multicast delegates in the context of UI interaction. The emphasis of this article would be to identify what exactly happens when you add an ...

Delegates vs. Interfaces in .NET        
Total Hits: 319  |  Today: 0 Author: Jon Shemitz       Rating:  
Read Reviews | Write Review |   Your Rating: 

When you write .NET code that takes callback parameters, your first instinct may be to use delegates, but it may not occur to you that you can use an interface instead. Learn why and when an interface may be a better answer....

Understanding Delegates in C#        
Total Hits: 132  |  Today: 0 Author: arul chinnappan       Rating:  
Read Reviews | Write Review |   Your Rating: 

Delegate is type which holds the method(s) reference in an object. It is also reffered as a type safe function pointers....

Implement Observer Pattern in absolutely easy example        
Total Hits: 54  |  Today: 0 Author: spiderman_anhvu       Rating:  
Read Reviews | Write Review |   Your Rating: 

When you develope your application. I'm sure that you have to handler many many objects. So If them have to interact with the same source data, I think that you must find a way to make them update with the change of data. Observer pattern is the key you can use for this solution! I have searched this website and found a little article talk about observer pattern. And I have read some article about event and delegate, too. So that I want to show you - the new developers the way to implement obser...

Creating EventArgs Using Generics        
Total Hits: 45  |  Today: 0 Author: Stewart       Rating:  
Read Reviews | Write Review |   Your Rating: 

Save Time using Generics creating EventArgs.
This article describes how to create a generics based EventArgs Class.
I have been working on a large project that has required me to write a ton of event args classes just to pass an object of one type or another in the event.
.net already contains an generic EventHandler Deleagate.
This class works but you do not get intellisense and need to cast objects to the proper type. After writing 20 or so different classes I came up with the idea...

C# Event arguments library        
Total Hits: 28  |  Today: 0 Author: elektrowolf       Rating:  
Read Reviews | Write Review |   Your Rating: 

There are many kinds of event arguments you often need, e.g. CancelEventArgs. This library contains a collection of event arguments.
These interfaces allow you to easily handle multiple events in one handler function.

The ICancelEventArgs contains two members (bool IsCanceled { get; } void Cancel();) to prevent event handlers from setting the Canceled property to false by using code like this......

Static Event Binding Using WithEvents        
Total Hits: 45  |  Today: 0 Author: Ted Pattison       Rating:  
Read Reviews | Write Review |   Your Rating: 

This month's Basic Instincts column builds upon my last three columns in which I introduced and explained the fundamental concepts and syntax associated with delegates and events. Last month I showed you how to design and write a simple class that defines and raises events. You also saw how to dynamically bind an event handler to an event using the AddHandler keyword. This month I am going to discuss static event binding, an alternative technique for registering an event handler....

Use Design Patterns to Simplify the Relationship Between Menus and Form Elements in .NET        
Total Hits: 28  |  Today: 0 Author: Michael Foster and Gilberto Araya       Rating:  
Read Reviews | Write Review |   Your Rating: 

In Windows Forms applications, similar commands, such as those in a menu and their counterparts on a toolbar, are not automatically related. They don't fire the same event or run the same handler routine. Yet code that allows the same or similar user commands to fire the same code simplifies development.
This article describes the principles of command management and why it's important to have functional commands that are not exclusive to any one UI element. In order to provide an MFC-l...

Events Made Simple        
Total Hits: 47  |  Today: 0 Author: DaveyM69       Rating:  
Read Reviews | Write Review |   Your Rating: 

When I first started progamming in C#, I got lost in the world of events and delegates. I searched CodeProject and Google etc but couldn't find any basic examples to just get me started so I could then experiment for myself. Most of what I found had either complicated object structures, silly names that were impossible to follow and meant nothing or insisted on explaining every last detail and variation and thus became confusing....

A realtime event log monitoring tool        
Total Hits: 24  |  Today: 0 Author: Marc Merritt       Rating:  
Read Reviews | Write Review |   Your Rating: 

I'm an instant gratification kind of person. I like to see who and from where my machine is being accessed, as it occurs. This tool allows you to do just that and provides a number of other event log monitoring capabilities....

Generic List of Mutable Objects with Events        
Total Hits: 21  |  Today: 0 Author: Igor Velikorossov       Rating:  
Read Reviews | Write Review |   Your Rating: 

Most applications directly or indirectly deal with databases and collections of objects. These collections are bound to some UI shown to the user, updated, saved... Well, you know the drill. Here, I would like to share the approach that works best for me....

How Events Work Under the Surface        
Total Hits: 28  |  Today: 1 Author: J. Dunlap       Rating:  
Read Reviews | Write Review |   Your Rating: 

This article aims to show you what goes on behind the "magic" that the compiler does when you declare a simple event member in a class. It is meant as a beginner article to answer a frequently-asked question, so please don't vote it down just because it is very basic....

A Universal Event Handler Factory        
Total Hits: 30  |  Today: 0 Author: Ulrich Proeller       Rating:  
Read Reviews | Write Review |   Your Rating: 

One of the most powerful features of the .NET Framework is Reflection. It enables us to dynamically load any assembly, enumerate its class types and even instantiate a class and call its properties and methods. We can do all this without any prior knowledge of the assembly we want to use.
Of course, in practice, we mostly know something about the assemblies to use them reasonably. This can be the name of a class, the name of a method, or a custom attribute which is attached to a class or a me...

Use System Events To Protect Your Application Data        
Total Hits: 22  |  Today: 0 Author: Neil Baliga       Rating:  
Read Reviews | Write Review |   Your Rating: 

If you’ve used the new MS Office products recently, you’ve noticed that Outlook, for instance, does not let you log off unless the application is closed. This is because Outlook does its data finalization when it closes and does not want cached data to be corrupted by a user logging off.
I recently worked on an application where we had to log streaming data which was cached for performance reasons, and then dumped the data to a file after certain criteria was met. The importance of the data m...

.NET Delegates: A C# Bedtime Story        
Total Hits: 35  |  Today: 0 Author: Chris Sells       Rating:  
Read Reviews | Write Review |   Your Rating: 

Once upon a time, in a strange land south of here, there was a worker named Peter. He was a diligent worker who would readily accept requests from his boss. However, his boss was a mean, untrusting man who insisted on steady progress reports. Since Peter did not want his boss standing in his office looking over his shoulder, Peter promised to notify his boss whenever his work progressed. Peter implemented this promise by periodically calling his boss back via a typed reference like so....


1  2  3  4  5  6  7  8  Next >> 


DevASP.Net - Disclaimer - Privacy
Copyright © 2008 DevASP.net