|
|
Stories recently tagged with 'Events'
|
|
submitted by
abdullin
22 days, 7 hours ago
rabdullin.com — You can drop a lot of repetitive code in C# event declaration and raising (including some EventArgs declarations, defining custom delegates, checking for nulls) if you follow these tips. read more...
add a comment
|
category: C# | Views: 19
|
|
tags:
.Net, Patterns, practices, C#, Event | tag it
Everyones tags: | Your tags: | |
|
|
|
|
|
published 5 months, 11 days ago, submitted by
Pakl
5 months, 13 days ago
dotnettoad.com — In this article I will show you how you can unit test your events. I will show you a simple technique that will enable you to test if your events fire exactly as often as you want them to and I will provide you with two implementations. One implementation works well with the .NET Framework 2.0 and the second one uses .NET 3.0 (anonymous methods) in order to minimize the code necessary. read more...
add a comment
|
category: C# | Views: 22
|
|
tags:
Events, UnitTesting, C#, TDD | tag it
Everyones tags: | Your tags: | |
|
|
|
|
|
submitted by
sotirisf
11 months, 7 days ago
dotnetzone.gr — Although I've seen a lot of articles describing how to dynamically add controls to a Web Form, few mention even a little hint to how you can make event handlers actually WORK with dynamically-added controls. This article may seem (and probably is) a beginner-level one, but I think it's essential to cover this issue. read more...
add a comment
|
category: ASP.NET | Views: 10
|
|
tags:
Controls, run-time, handlers, Events, runtime | tag it
Everyones tags: | Your tags: | |
|
|
|
|
|
published 1 year, 6 months ago, submitted by
cls2deg
1 year, 6 months ago
diditwith.net — One of the greatest frustration of working with delegates and events is that they can potentially cause memory leaks if they aren't unhooked. In this article, we will solve this problem in a variety of ways to get the best performance, memory use and syntax. read more...
2 comments
|
category: C# | Views: 36
|
|
tags:
EventHandlers, Events, Generics, Delegates | tag it
Everyones tags: | Your tags: | |
|
|
|
|
|
published 1 year, 8 months ago, submitted by
dwahlin
1 year, 8 months ago
weblogs.asp.net — It's no secret that events and delegates play a crucial role in the .NET framework. Without them it would be hard to handle user input or notify other objects when an action occurs. In this video Dan Wahlin outlines the fundamentals of creating a custom class that exposes an event and a delegate. The video also demonstrates how to create a custom EventArgs class and how events can be consumed using C#. read more...
add a comment
|
category: C# | Views: 14
|
|
tags:
Events, Delegates, C#, Video | tag it
Everyones tags: | Your tags: | |
|
|
|
|
|
submitted by
Hyle
1 year, 10 months ago
en.csharp-online.net — Learn to use C# delegates and events. Excerpt: n programming, you are often faced with situations where you need to execute a particular action, but you don’t know in advance which method, or even which object, you’ll want to call upon to execute it. For example, a button might know that it must notify some object when it is pushed, but it might not know which object or objects need to be notified. Instead of wiring the button to a particular object, you will connect the button to a delegate and then resolve that delegate to a particular method when the program executes.
In the early, dark, and primitive days of computing, a program would begin execution and then proceed through its steps until it completed. If the user was involved, the interaction was strictly controlled and limited to filling in fields.
Today’s GUI programming model requires a different approach, known as event driven programming. A modern program presents the user interface and waits for the user to take an action. The user might take many different actions, such as choosing among menu selections, pushing buttons, updating text fields, clicking icons, and so forth. Each action causes an event to be raised. Other events can be raised without direct user action, such as events that correspond to timer ticks of the internal clock, email being received, file-copy operations completing, etc.
An event is the encapsulation of the idea that "something happened" to which the program must respond. Events and delegates are tightly coupled concepts because flexible event handling requires that the response to the event be dispatched to the appropriate event handler. An event handler is typically implemented in C# via a delegate. Delegates are also used as callbacks so that one class can say to another "do this work and when you’re done, let me know."
read more...
add a comment
|
category: C# | Views: 5
|
|
tags:
Delegates, Events, C# | tag it
Everyones tags: | Your tags: | |
|
|
|
|
|
published 1 year, 10 months ago, submitted by
bashmohandes
1 year, 10 months ago
spellcoder.com — This is another "How I missed this" kind of things,
All of us know Accessors like properties & indexers, and almost everybody says that it applies for all data types, but almost nobody knows that events have its own accessors read more...
|
|
tags:
Events, Tips, C# | tag it
Everyones tags: | Your tags: | |
|
|
|
|
|
submitted by
Hyle
1 year, 10 months ago
en.csharp-online.net — Learn all about C# delegates and events. Excerpt: A delegate is a .NET class that encapsulates a method, but not in the same way other classes encapsulate methods. A delegate actually stores the address of a method that is contained in some other class. So, a delegate is really the equivalent of a function pointer in C++. However, they are also far more than that. In this article, I explain the many uses of delegates. I begin with a simple example using a delegate to invoke a method. Then, I show several other uses of delegates including multicast delegates, thread delegates, anonymous methods, asynchronous method calls, events, and Win32 callbacks.
read more...
add a comment
|
category: C# | Views: 9
|
|
tags:
C#, Delegates, Events | tag it
Everyones tags: | Your tags: | |
|
|
|
|

Sponsored Link: www.carlist.ie
Ads via The Lounge
|