Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / VB.NET / October 2004

Tip: Looking for answers? Try searching our database.

coversion to c#

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Reza - 22 Oct 2004 22:26 GMT
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
CJ Taylor - 23 Oct 2004 00:56 GMT
public class EventSing: IListEventSink
{

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

   try {

   } catch (Exception ex) { }

}

}

> How  can I change the following code to the equivalent in C#
>
[quoted text clipped - 5 lines]
>
>          On Error Resume Next
Reza - 23 Oct 2004 03:03 GMT
"implement is not supported in C#" .I found the correct syntax as follow:

Microsoft.SharePoint.IListEventSink.OnEvent(Microsoft.SharePoint.SPListEvent
listEvent)
{
}

thanks for your help anyways,
Reza
> public class EventSing: IListEventSink
> {
[quoted text clipped - 19 lines]
> >
> >          On Error Resume Next
CJ Taylor - 23 Oct 2004 17:06 GMT
Yeah I realized that this morning.  My bad.  Everythign else should have
been money though, sorry about that.

> "implement is not supported in C#" .I found the correct syntax as follow:
>
[quoted text clipped - 28 lines]
>> >
>> >          On Error Resume Next
David Anton - 23 Oct 2004 01:55 GMT
See my reply in the C# group.

1. There is no implements keyword in C#

2. You must realize that to replace that "On Error Resume Next" you
would have to reproduce that try/catch block for *every single*
statement.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.