JavaRush
AI Academy
new
Learning
Courses
Tasks
Quizzes
Games
Help
Schedule of nudges
Internship
Community
Users
Forum
Chat
Articles
Activities
Reviews
Subscriptions
Light theme

Lectures

  • Reviews
  • About us
  • CS50
Start
Start learning
Start learning
  • My progress
  • Courses
  • Quest map
  • Lectures
  • Common mistakes with delegates and events

    C# SELF
    54 level,0 lecture
    We go over frequent slip-ups when working with events and delegates: double subscription ( +=), forgotten unsubscription ( -=, IDisposable), exceptions in handlers and iterating via GetInvocationList(), modifying subscriptions during broadcast, calls when null and safe ?.Invoke, correct signatures EventHandler/ EventHandler<T>, invoking only via OnEventName, careful add/ remove accessors, traps with static events, closures in lambdas and the weak event pattern. Plus recommendations on naming and standard signatures.
    Open
  • Recommendations for organizing code

    C# SELF
    54 level,1 lecture
    Practical rules for working with events in C#: choosing the delegate ( EventHandler), the call pattern via OnEvent, correct subscribe/unsubscribe with IDisposable and using, thread-safe invocation ( Invoke), strong typing via EventArgs, documentation, architectural tips and analysis of antipatterns.
    Open
  • Optimizing Event-Driven Programming

    C# SELF
    54 level,2 lecture
    How to make event code fast and reliable: the cost of event and delegates, the impact of "heavy" handlers, exception handling, asynchronous fire-and-forget calls, memory savings via EventHandlerList, thread-safety with lock, custom accessors add/ remove and profiling ( GetInvocationList, Task.WhenAll). Practice, pitfalls and best tricks.
    Open
  • Delegates: advanced scenarios

    C# SELF
    54 level,3 lecture
    In this lecture we go over advanced scenarios of using delegates in C#: callbacks and asynchrony, strategies and comparators, lambdas and anonymous methods, chains of handlers, events and reactive subscriptions, closures, multicast, inversion of control and extensibility, working with LINQ and currying. We'll talk about comparing delegates, serialization and differences between delegates and events ( event). You’ll get practical examples with Action/ Func, tips for DI/IoC and a breakdown of common mistakes.
    Open
  • Event-driven programming examples ( event)

    C# SELF
    54 level,4 lecture
    Step-by-step we go through practical uses of events and delegates in C#: from a simple chat with notifications to pub/sub-style signaling, handling async completions, a mechanism to cancel the chain of handlers, and thread-safe subscriber management. Examples cover WinForms/WPF/MAUI, dynamic subscribe/unsubscribe, working with EventHandler, EventArgs, INotifyPropertyChanged, and common pitfalls plus how to avoid them.
    Open
Courses
  • Java Course
  • Python Course
  • Development with Claude Code
  • All 16 courses
University
  • Java FullStack
  • Python FullStack
  • AI Native Developer
  • Web FullStack
Community
  • Articles
  • Forum
  • Help with Tasks
Company
  • About us
  • Contacts
  • Reviews
  • Pricing
  • Questions and answers
JavaRush JavaRush: online courses in Java and other programming languages, where you learn by solving tasks. We started in 2012 with a Java course, and today there are 16 courses: Java and Spring, Python, web development, SQL, Go, C#, C++, Kotlin, Swift, Docker and AI development. More than 10,000 tasks with instant checks, and the first level of any course is free. Learn on your own or with a mentor at JavaRush University.
Follow us
Язык интерфейса
Русский
English
Українська
"Programmers are not born" © 2026 JavaRush Terms of Use and Privacy policy
MastercardVisa
"Programmers are not born" © 2026 JavaRush Terms of Use and Privacy policy