JavaRush
AI Academy
new
Promotion
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
  • Publisher-Subscriber pattern and events in C# ( event)

    C# SELF
    52 level,0 lecture
    We break down how the Publisher-Subscriber is implemented in C#: delegates and events, standard types EventHandler/ EventHandler<TEventArgs>, subscribing and unsubscribing ( +=/ -=), safe invocation via Invoke and checking for null. A practical timer example and analysis of common mistakes.
    Open
  • Creating events using delegates ( event and delegate)

    C# SELF
    52 level,1 lecture
    We break down how to declare and raise events based on delegates: basic event/ delegate syntax, the EventHandler and EventHandler<TEventArgs> pattern, safe invocation via ?.Invoke(), subscribing and unsubscribing ( +=/ -=), passing data via EventArgs, and common mistakes and how to avoid them.
    Open
  • Subscribing to an event and creating handlers

    C# SELF
    52 level,2 lecture
    In this lecture we cover how to subscribe to events and create handlers: from the basic syntax with the += operator to practical use with delegates Action and EventHandler. We'll learn how to use lambda expressions, unsubscribe correctly ( -=), attach multiple handlers and avoid common mistakes (signature mismatch, closures, NullReferenceException and multiple subscriptions).
    Open
  • Standard event pattern ( EventHandler/ EventArgs)

    C# SELF
    52 level,3 lecture
    We break down the canonical .NET event style: why EventHandler and EventArgs exist, how to use the standard signature (object sender, EventArgs e), create custom event arguments and correctly raise the event via an On... method. We'll show the benefits of a single standard, code examples, diagrams and common mistakes.
    Open
  • Event handling: lambda expressions

    C# SELF
    52 level,4 lecture
    This lecture shows how to concisely subscribe to events using lambdas ( =>) instead of named methods: syntax, variable capture (closures), working with EventHandler and EventHandler<T>, and typical mistakes (for example, forgotten unsubscription -=) and best practices — when to keep logic in a lambda and when to move it to a method.
    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