As shown in the following example, use the BeginStartConversation method to start a conversation in a Microsoft Lync 2010 SDK application. Also see the walkthrough examples listed in the topic Conversation Walkthroughs .

  Copy imageCopy Code
//Create string array of conversation invitees.
string[] invitees = {"elise@contoso.com"};

// Create a generic Dictionary object to contain conversation
setting objects.
Dictionary<AutomationModalitySettings, object> _settings =
new Dictionary<AutomationModalitySettings, object>();
_settings.Add(AutomationModalitySettings.FirstInstantMessage,
″Hello″);
_settings.Add(AutomationModalitySettings.SendFirstInstantMessageImmediately,
true);

// Start the conversation.
IAsyncResult ar = 
LyncClient.GetAutomation().BeginStartConversation(
	ModalityTypes.InstantMessage, 
	invitees, 
	_settings,
	null,
	null);

//Block UI thread until conversation is started and Conversation
Window is displayed.
LyncClient.GetAutomation().EndStartConversation(ar);


See Also