0

im very new to C# as well as lync SDK, can sumone help me to understand the meaning of the below line. what i understood was whenever lefthand side event occures it will call the rightthand side handler. am i correct?

lyncClient.ConversationManager.ConversationAdded += ConversationManager_ConversationAdded;
jammy
  • 73
  • 6

1 Answers1

1

You add an event handler called ConversationManager_ConversationAdded to a structure associated with event ConversationAdded. When a ConversationAdded event occurs, all handlers added will be called with arguments defining context of this event occurence.

Mariusz
  • 481
  • 2
  • 4
  • 11
  • thanks :) .i have seen many sample code where the ConversationManager_ConversationAdded event handler is having 2 arguments. these arguments are sent by default? – jammy Aug 19 '14 at 11:56
  • yes those arguments will be provided to your event handler when it is called, you don't have to do anything. – Paul Hodgson Aug 20 '14 at 12:53
  • They are here to provide you context of event call - first one contains the object sender (in this case `lyncClient.ConversationManager`); the one (unless it's plain `System.EventArgs`) could carry some additional information. – Mariusz Aug 20 '14 at 13:30