I need to create mechanism which waits IAsycnResult method till complete. How can i achieve this ?
IAsyncResult result = _contactGroupServices.BeginDeleteContact(
contactToRemove.Uri,
ar =>
{
try
{
_contactGroupServices.EndDeleteContact(ar);
}
catch (RealTimeException rtex)
{
Console.WriteLine(rtex);
}
},
null );