Monday, March 28, 2022

Events and Delegates

focus on event and delegate

    extremely good posts

  1. Events Made Simple
  2. Events made simple

  3. Delegates and Events
  4. 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.

  5. Complex Properties in C#
  6. 'Complex properties' and Size3D in C#.

    other good posts

  7. Delegates and Events In C# .NET
  8. In this article, you will learn how to create and manipulate delegate types as well as C# events that streamline the process of working with delegate types.

  9. Events In C#
  10. Events are members of the class that raises them. When some thing happens a class can raise an event, which have a message that contain informations about the event (event arguments) and send them out to the rest of the application, other parts of the application can respond to the event by excuting methods called event handlers.

  11. Advances in .NET Event Handling
  12. In this article we shall discuss the means in which event handlers are executed in .NET applications. This is a very important topic, because most .NET applications are event driven and mistakes and misunderstandings in event handling may cause them to work incorrectly. As will be shown, the order of execution of event handlers may become a major issue in event driven applications, especially when event handlers change the state of the object that has raised the event or changes the contents of the event arguments that are shared among handlers. Due to these interactions, application behavior may become unexpected and unpredictable, leading to errors that are hard to trace when debugging the application.

  13. Event Handling in C#
  14. No GUI application is complete without enabling actions. Even though arranging components is of significant issue, applying actions is also equally important. It is these actions that instruct the program what to do when something happens, like for example Mouse click, Keyboard press etc. Before beginning our discussion let us review how different API's handle events.

  15. Using Property Grid In C#
  16. Are you familiar with the window in Visual Studio .NET that lets you edit all your forms? You know, the one that you wish you could add to all your programs because it has such a cool interface? You know, the Property Window! Well guess what? You can add it to your windows form as part of your design and use it to allow users to edit class properties directly because Microsoft has provided it, they just don't display it initially in the toolbox.The control is called the Property Grid and you have full access to it. Simply right click on the toolbox

  17. A UITypeEditor for easy editing of flag enum properties in the property browser
  18. A UITypeEditor for easy editing of flag enum properties in the property browser.

  19. Creating Property Editors in DesignTime for VS.Net Easily (UITypeEditor Helper)
  20. This is a base class to help easily create UITypeEditors. It is used to edit control properties in a DropDown window or a Modal-Form in design mode in the Visual Studio IDE

  21. Building a custom UITypeEditor
  22. Design Custom Editor For A Property
  23. UITypeEditor Classes
  24. If you are a Custom Control developer, you work hard provide a good design mode experience within Visual Studio.Net. One aspect to that experience is providing UITypeEditors for the Property window which lets the user manipulate your properties. Building a UITypeEditor is not difficult although it always helps to have something to start you out. This package defines two base classes for Drop Down List type UITypeEditors.

  25. C# Property Examples
  26. Asynchronous Method Invocation
  27. How to use .NET to call methods in a non-blocking mode.

    static

  28. Static Class, Singleton and their Side Effects
  29. This article questions the usage of singleton and static class and discusses about ways to avoid them.

  30. Static keyword in C#
  31. static is a modifier in C# which is applicable for the following:

    1. Classes
    2. Variables
    3. Methods
    4. Constructor
    It is also applicable to properties, event, and operators. To create a static member(class, variable, methods, constructor), precede its declaration with the keyword static. When a member is declared static, it can be accessed with the name of its class directly.

  32. Must Remember: 9 Key Concepts to Keyword ‘Static’
  33. Article summarizes some of the key concepts around the keyword ‘Static’ which every developer must remember.

  34. Static Keyword Demystified
  35. This article aims to clear the confusion regarding the use of the static keyword in C#.

  36. Introducing C# 2.0 static classes
  37. A general discussion on C# 2.0 static classes.

  38. Property Acccesor Modifiers
  39. General description of the new property accessor modifiers in C# 2.0.

  40. UML definitions
  41. This article can be used as a glossary of many RUP and UML elemnts

  42. Introducing C# 2.0 Partial Types
  43. A general discussion on C# 2.0 partial types.

  44. Understanding Static Methods and Data
  45. This article may be helpful for beginners of C#

  46. Object-Oriented Static Destructors
  47. In Delphi, there was always available initialization and finalization section for units. But have you ever wondered how to achieve the same using .NET?

  48. Static Interfaces in C#
  49. Introducing a library (distributed as a Nuget package) that is compensating for the lack of static interfaces in C#

  50. Static Members vs Instance Members (Overview)
  51. An overview on how Static and Instance Declaration works

  52. What is the use of static variable in C#? When to use it? Why can't I declare the static variable inside method?
  53. I have searched about static variables in C#, but I am still not getting what its use is. Also, if I try to declare the variable inside the method it will not give me the permission to do this. Why?

  54. Static Constructors (C# Programming Guide)
  55. A static constructor is used to initialize any static data, or to perform a particular action that needs to be performed only once. It is called automatically before the first instance is created or any static members are referenced.

  56. What is the use of static constructors?
  57. Please explain to me the use of static constructor. Why and when would we create a static constructor and is it possible to overload one?

  58. Static Constructor In C# And Its Usages
  59. C# supports two types of constructors, a class constructor (static constructor) and an instance constructor (non-static constructor).

    1. The static constructor for a class executes before any instance of the class is created.
    2. The static constructor for a class executes before any of the static members for the class are referenced.
    3. The static constructor for a class executes after the static field initializers (if any) for the class.
    4. The static constructor for a class executes at most one time during a single program instantiation
    5. A static constructor does not take access modifiers or have parameters.
    6. A static constructor is called automatically to initialize the class before the first instance is created or any static members are referenced.
    7. A static constructor cannot be called directly.
    8. The user has no control on when the static constructor is executed in the program.
    9. A typical use of static constructors is when the class is using a log file and the constructor is used to write entries to this file.

  60. C# | Difference between Static Constructors and Non-Static Constructors
  61. Static constructors are used to initialize the static members of the class and are implicitly called before the creation of the first instance of the class. Non-static constructors are used to initialize the non-static members of the class. Below are the differences between the Static Constructors and Non-Static Constructors.

    1. Overloading: Non-static constructors can be overloaded but not the static constructors. Overloading is done on the parameters criteria. So if you cannot pass the parameters to the Static constructors then we can’t overload it.
    2. Cases in which the constructor will be implicit: Every class except the static class(which contains only static members) always contains an implicit constructor if the user is not defining an explicit constructor. If the class contains any static fields then the static constructors are defined implicitly.

  62. Invoking an overloaded constructor using this keyword in C#
  63. C# provides a powerful keyword known as this keyword and this keyword has many usages. Here we use this keyword to call an overloaded constructor from another constructor.

  64. Private Constructors in C#
  65. Private Constructor is a special instance constructor present in C# language. Basically, private constructors are used in class that contains only static members. The private constructor is always declared by using a private keyword.

  66. C# | Copy Constructor
  67. A constructor that creates an object by copying variables from another object or that copies the data of one object into another object is termed as the Copy Constructor. It is a parameterized constructor that contains a parameter of the same class type. The main use of copy constructor is to initialize a new instance to the values of an existing instance. Normally, C# does not provide a copy constructor for objects, but if you want to create a copy constructor in your program you can create according to your requirement.

  68. C# | Inheritance in Constructors
  69. In C#, both the base class and the derived class can have their own constructor. The constructor of a base class used to instantiate the objects of the base class and the constructor of the derived class used to instantiate the object of the derived class. In inheritance, the derived class inherits all the members(fields, methods) of the base class, but derived class cannot inherit the constructor of the base class because constructors are not the members of the class. Instead of inheriting constructors by the derived class, it is only allowed to invoke the constructor of base class.

  70. Private Constructors (C# Programming Guide)
  71. A private constructor is a special instance constructor. It is generally used in classes that contain static members only. If a class has one or more private constructors and no public constructors, other classes (except nested classes) cannot create instances of this class.

  72. Fun with Singletons in C# 2.0
  73. This article will show you how to create generic singletons that honor all of their properties and at the same time are extensible enough to handle not so obvious scenarios.

  74. Generic Singleton Provider
  75. An article describing how to use Generics to create a singleton provider.

  76. Implementing the Singleton Pattern in C#
  77. This article describes about design pattern namely Singleton Pattern.

  78. Private Constructor - C#
  79. Here, I have described private constructor and its usage in C#. This article will be useful to both beginners and professional C# developers.

No comments:

Post a Comment