.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
Sharon Maxwell
Post New Web Links

Delegates and events in c#.net

Posted By: syed shakeer hussain     Posted Date: March 16, 2010    Points: 2   Category :C#
 
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 overloading of the term "delegate". Sometimes it is used to mean a delegate type, and at other times it can be used to mean an instance of a delegate type. I'll use "delegate type" and "delegate instance" to distinguish between them, and "delegate" when talking about the whole topic in a general sense.


View Complete Post


More Related Resource Links

delegates and events with interface

  

This is working fine and dandy but I am already starting to incur some issues with readability. I am wondering if there is a documented schema for implementing events and possibly delegates in an interface? Here is what I have so far...

 

namespace NSMR.Rule { public interface IRule { int pk_rule_id { get; set; } string rule_name { get; set; } DateTime date_created { get; set; } DateTime date_updated { get; set; } string created_by { get; set; } string updated_by { get; set; } string description { get; set; } int pk_facility_id { get; set; } string generated_sql { get; set; } event EventHandler OnRuleCreated; } }

namespace

NSMR.Rule

{

 

public

can events exist without delegates

  
Can events exist without delegates ! either in C# or VB .NET

WCF Tutorial - Events and Callbacks

  
we described how to make a very simple client/server application where clients would call functions on the server through a shared interface. In this tutorial, I'm going to expand that application to allow the server to execute functions on the client by using callbacks. Essentially, this is WCF's mechanism to allow events to be raised from the server to it's connected clients.

How to listen to events within a listview

  

Hi,

I've got a listview and I've put a button control in one of the columns, I'm trying to figure out how I have listen to the button click within a certain row, but can't see the button in the dropdown for the IDs I can generate events for.

I'd like to get the primary key of the row that's been clicked on and then run a sql statement against it.


Any help would be appreciated.


UI Frontiers: Multi-Touch Manipulation Events in WPF

  

Multi-touch has progressed from being a futuristic prop of sci-fi films to a mainstream means of user interface. We'll show you how support for multi-touch in Windows 7 has filtered down and settled into various areas of the .NET Framework.

Charles Petzold

MSDN Magazine August 2010


Event Tracing For Windows: Core Instrumentation Events in Windows 7, Part 2

  

In Part 2, the authors cover core OS Event Tracing for Windows (ETW) events as well as present simple scripts to demonstrate a few basic accounting techniques on some of the OS events introduced.

Alex Bendetov, Insung Park

MSDN Magazine October 2009


Event Tracing for Windows: Core Instrumentation Events in Windows 7

  

In the first article of a two-part series, the authors present a high-level overview of the ETW technology and core OS instrumentation.

Alex Bendetov, Insung Park

MSDN Magazine September 2009


Advanced WPF: Understanding Routed Events And Commands In WPF

  

See how routed events and routed commands in Windows Presentation Foundation form the basis for communication between the parts of your UI.

Brian Noyes

MSDN Magazine September 2008


Office Space: Events in SharePoint 2007

  

Windows SharePoint Services (WSS) 3.0 provides a new and improved infrastructure for handling server-side events. In this installment of Office Space, we look at techniques for hooking up Before Events and After Events using both Features and code.

Ted Pattison

MSDN Magazine November 2007


WCF Essentials: What You Need To Know About One-Way Calls, Callbacks, And Events

  

Object and component-oriented programming have only one way for clients to call a method, but Windows® Communication Foundation introduces two more. In this article Juval Lowy explains how they work.

Juval Lowy

MSDN Magazine October 2006


Basic Instincts: Programming Events of the Framework Class Libraries

  

Some practical examples of handling some of the more commonly used events in the Microsoft .NET Framework.

Ted Pattison

MSDN Magazine May 2003


Delegates in .NET: A Primer on Creating Type-Safe References to Methods in Visual Basic .NET

  

Delegates, new in Visual Basic .NET, are type-safe, object-oriented references to methods. By using delegates, you make your methods accessible to others and therefore more extensible. This article provides an introduction to delegates, their benefits, and how they are used.Here the author shows you how to declare, create, and use delegates to invoke instance and shared methods at run time, and how to implement delegates as properties. He then goes on to provide examples of how delegates are used for callback functionality and explains the relationship between delegates and events. Finally, the article provides a glimpse at how delegates are implemented in intermediate language code by the Visual Basic .NET compiler.

Jesse Liberty

MSDN Magazine February 2003


Categories: 
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend