VB.Net snippet vonversion to C#

  • Thread starter Thread starter Reza
  • Start date Start date
R

Reza

How can I change the following code to the equivalent in C#



Public Class EventSink : Implements IListEventSink

Public Sub OnEvent(ByVal listEvent As Microsoft.SharePoint.SPListEvent)
Implements Microsoft.SharePoint.IListEventSink.OnEvent

On Error Resume Next

.........

End Class 'EventSink

End class





thanks for your help
 
The part up to the "On Error Resume Next" was ran through our Instant
C# VB.NET to C# converter and it yields:

public class EventSink : IListEventSink
{

void
Microsoft.SharePoint.IListEventSink.OnEvent(Microsoft.SharePoint.SPListEvent
listEvent)
{
OnEvent(listEvent);
}
public void OnEvent(Microsoft.SharePoint.SPListEvent listEvent)
{


There is no acceptable substitute for On Error Resume Next. You would
have to surround each statement after it with a try/catch block - this
is so ugly that we just provide a warning for these lines.

*-----------------------*
Posted at:
www.GroupSrv.com
*-----------------------*
 
Back
Top