This is a migrated thread and some comments may be shown as answers.

use a raiseevent

2 Answers 130 Views
Code Converter
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Per Holmqvist
Top achievements
Rank 2
Per Holmqvist asked on 13 Apr 2007, 08:40 PM
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
protected virtual void OnStopped(object sender, IIsWebSiteEventArgs e)  
        {  
            if (this.Stopped != null)  
            {  
                this.Stopped(sender, e);  
            }  
        }  
 

The generated VB code
    Protected Overridable Sub OnStopped(ByVal sender As Object, ByVal e As IIsWebSiteEventArgs)  
        If Me.Stopped <> Nothing Then  
            Me.Stopped(sender, e)  
        End If  
    End Sub  
 

2 Answers, 1 is accepted

Sort by
0
Vladimir Milev
Telerik team
answered on 16 Apr 2007, 03:07 PM
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.

Greetings,
Vladimir Milev
the telerik team

Instantly find answers to your questions at the new telerik Support Center
0
Todd Anglin
Top achievements
Rank 2
answered on 18 Apr 2007, 07:18 AM
Per-

As Vlad suggested, problems with the core converting issue are the domain of the SharpDevelop team over at www.sharpdevelop.net. 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.

Thanks~
Todd
Tags
Code Converter
Asked by
Per Holmqvist
Top achievements
Rank 2
Answers by
Vladimir Milev
Telerik team
Todd Anglin
Top achievements
Rank 2
Share this question
or