How to actually create an event in C#
c#, events, initialization
Solution
No, events are just a special use of delegates. You can't have an event without a delegate (though you can have a delegate without an event - read up on delegates for more info).
Not really sure I understand your question here. The description of the event would be in the documentation. Looking at the code alone, you just know that there is an event called Tick on that object that you can attach an event handler to.
When you add an event handler to Tick (that's the `+=` lines you see) it will become non-null. That's what those `!= null` checks are doing - making sure that someone has attached onto the event.
Problem
I am a beginner in C# events , and delegates. Few questions that would make sense if you look at the URL I have used to learn about events. Can I ever have an event without a delegate associated to it? The exmaples that I have found always have them together. For example I do not understand how does the event get generated. I am totally lost, I understand that Tick is defined as an event but what is the Tick's event description? where do I define what constitutes the Tick? Also where does the Tick value gets ever initailized. It seems that all the examples I have looked at never initialize the event and have a similar statement to statement : If (Tick ! =null) in the attached example but it is not obviuos where is the Tick is initialized. I have looked around and I just cant find any answer. Thanks in advance for your help