title: Translate code from c# in vb (complex raise event)
body: <p>I have this piece of code which I am not able to translate from c# to vb:</p>
  
  <pre><code>  // subscribe for errors that occur when applying changes to the client
  ((SqlSyncProvider)syncOrchestrator.LocalProvider).ApplyChangeFailed += new EventHandler&lt;DbApplyChangeFailedEventArgs&gt;(Program_ApplyChangeFailed);
  </code></pre>
  
  <p>it must be somethink like this :</p>
  
  <pre><code>DirectCast(syncOrchestrator.LocalProvider, SqlSyncProvider).ApplyChangeFailed += New EventHandler(Of DbApplyChangeFailedEventArgs)(AddressOf Program_ApplyChangeFailed)
  </code></pre>
  
  <p>I got an error which is saying: </p>
  
  <p><strong><em>'Public Event ApplyChangeFailed(sender As Object, e As Microsoft.Synchronization.Data.DbApplyChangeFailedEventArgs)' is an event, and cannot be called directly. Use a 'RaiseEvent' statement to raise an event.</em></strong></p>
  
  <p>I do not know what/how to raise this even! is too complex for me :(</p>
  
  <p>Can someone help me? </p>