C# Events - Creating and Consuming Events in Your Application
You almost certainly know what events are in C#. Even if you do not, you've probably used them before. What you may not know is how to create your own events. In this video, I am going to introduce you to events and walk you through creating your own events. We will also discuss the features we can take advantage of and what best practices are that we should know about.
Source Code: https://leadmagnets.app/?Resource=CSharpEvents
Patreon: https://patreon.com/IAmTimCorey
Newsletter signup: https://signup.iamtimcorey.com/
0:00 - Intro
1:19 - Demo application walk-through (WinForms)
3:18 - Code behind the demo app
18:28 - Event: Button click
21:21 - Creating and Invoking custom Event
26:35 - Event?.Invoke() explained
30:00 - Listening to and writing code for the Event
34:00 - Creating the custom Event: Event in action and recap
37:12 - Event argument information: debugging
38:42 - Creating Another custom Event (overdraft event)
43:28 - Listening for the event in multiple places
46:33 - Removing Event Listeners from memory
49:00 - Generic EventHandler: Passing class for T
53:39 - why not to use "public set" for properties
59:25 - Exception when to use public set
1:06:13 - Summary
Видео C# Events - Creating and Consuming Events in Your Application канала IAmTimCorey
Source Code: https://leadmagnets.app/?Resource=CSharpEvents
Patreon: https://patreon.com/IAmTimCorey
Newsletter signup: https://signup.iamtimcorey.com/
0:00 - Intro
1:19 - Demo application walk-through (WinForms)
3:18 - Code behind the demo app
18:28 - Event: Button click
21:21 - Creating and Invoking custom Event
26:35 - Event?.Invoke() explained
30:00 - Listening to and writing code for the Event
34:00 - Creating the custom Event: Event in action and recap
37:12 - Event argument information: debugging
38:42 - Creating Another custom Event (overdraft event)
43:28 - Listening for the event in multiple places
46:33 - Removing Event Listeners from memory
49:00 - Generic EventHandler: Passing class for T
53:39 - why not to use "public set" for properties
59:25 - Exception when to use public set
1:06:13 - Summary
Видео C# Events - Creating and Consuming Events in Your Application канала IAmTimCorey
Показать
Комментарии отсутствуют
Информация о видео
Другие видео канала
Intro to Unit Testing in C# using XUnitDelegates in C# - A practical demonstration, including Action and FuncC# Access Modifiers (beyond public and private) - what they are, how to use them, and best practicesRefactoring in C# - Improving an Existing ApplicationWinForm vs WPF vs UWP vs Console - The C# Desktop UI Showdown (and the future with .NET 5)Design Patterns: Liskov Substitution Principle Explained Practically in C# (The L in SOLID)Picking a New MVVM Framework - Moving from Caliburn MicroASP.NET MVC Data Access in C# - The complete data path from database to display and backC# Events and Delegates Made Simple | MoshTop 10 Free Tools from Microsoft (plus bonuses)Design Patterns: Dependency Inversion Principle Explained Practically in C# (The D in SOLID)C# Generics - What they are, why they are useful, and how to create them.NET Core 3.1 MVC REST API - Full Course15 Visual Studio Editor Tips including Intellicode and EditorConfigEntity Framework Best Practices - Should EFCore Be Your Data Access of Choice?WPF in C# with MVVM using Caliburn MicroTop 10 Hidden Gems in Visual Studio - Speed Up Development Without Increasing Your CostsDebugging in C# - Finding and Fixing Problems in Your Application