use a raiseevent

3 posts, 0 answers
  1. Per Holmqvist
    Per Holmqvist avatar
    194 posts
    Member since:
    Nov 2002

    Posted 13 Apr 2007 Link to this post

    When trying to convert C# code to VB I get error
    Error 11 'Public Event Started(sender As Object, e As IIsWebSiteEventArgs)' is an event, and cannot be called directly. Use a 'RaiseEvent' statement to raise an event.

    The orginal C# code
    1 protected virtual void OnStopped(object sender, IIsWebSiteEventArgs e)  
    2         {  
    3             if (this.Stopped != null)  
    4             {  
    5                 this.Stopped(sender, e);  
    6             }  
    7         }  

    The generated VB code
    1     Protected Overridable Sub OnStopped(ByVal sender As Object, ByVal e As IIsWebSiteEventArgs)  
    2         If Me.Stopped <> Nothing Then  
    3             Me.Stopped(sender, e)  
    4         End If  
    5     End Sub  
  2. Vladimir Milev
    Vladimir Milev avatar
    1061 posts

    Posted 16 Apr 2007 Link to this post

    Hello Per Holmqvist,

    Unfortunately this seems to be a problem for NRefactory library which we use for the code conversion. I am afraid that there is little we can do about this issue as it is currently out of our control.

    Vladimir Milev
    the telerik team

    Instantly find answers to your questions at the new telerik Support Center
  3. Todd Anglin
    Todd Anglin avatar
    2040 posts
    Member since:
    Aug 2005

    Posted 18 Apr 2007 Link to this post


    As Vlad suggested, problems with the core converting issue are the domain of the SharpDevelop team over at I'd highly encourage you to deliver this feedback to their support forums so the developers that maintain NRefactory can improve it for the whole community.

Back to Top