473,657 Members | 2,397 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

VB.Net snippet vonversion to C#

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

Public Class EventSink : Implements IListEventSink

Public Sub OnEvent(ByVal listEvent As Microsoft.Share Point.SPListEve nt)
Implements Microsoft.Share Point.IListEven tSink.OnEvent

On Error Resume Next

.........

End Class 'EventSink

End class

thanks for your help
Nov 16 '05 #1
1 1138
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.Share Point.IListEven tSink.OnEvent(M icrosoft.ShareP oint.SPListEven t
listEvent)
{
OnEvent(listEve nt);
}
public void OnEvent(Microso ft.SharePoint.S PListEvent 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
*-----------------------*
Nov 16 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
9500
by: Andy Gayton | last post by:
Hey all, It looks like dynamic changes to a html document are only redrawn when the current code snippet comes to an end. For example the following page changes the text in a span, waits for a bit, and then sets the text in the span to something else when done. You don't see the change though. -----
0
1031
by: danieljroot | last post by:
I would like to create a code snippet for a property that automatically names the underlying field with standard naming convention: typing propn string MyProp would expand to: private string myProp; public string MyProp { ....
2
1963
by: daokfella | last post by:
Hi all, I've created a code snippet in VS 2005 and saved it in the proper snippet folder. When I right-click and select Insert Snippet, I navigation to My Code Snippets and it shows my snippet. However, when I click my snippet, nothing happens. Has anybody else experienced this? Inserting the supplied snippets works just fine. However, no snippet I create works even though it can be selected as a snippet from the intellisense.
3
1847
by: Hardy | last post by:
I created a code snippet which is for displaying file name,Line number and function name in C#.NET project. // <File> sf.GetFileName() // </File> // <Line> sf.GetFileLineNumber().ToString() // </Line> // <Function>
0
331
by: frankatle | last post by:
Hi. I am writing a opensource code snippet manager in python (pyqt4). The idea is that users can upload their snippets to remote subversion server, (if they choose) and add comments to existing snippets, vote for snippet deletion, add flags to snippets: (tested, working, not working... etc) The snippets are stored locally in a sqlite3 database. So far i have a working application that use a small Soap client/ server to upload snippets...
2
1903
by: steve.falzon | last post by:
Hi I've been searching high and low for this info but have been unsuccessful so far. I wonder if anybody knows where I can get a specification for the directives contained within the code element of a snippet. I'm not looking for info on literals such as $SystemAttributeUsage$ which are described by Literal nodes and vary with each snippet but info on directives such as $end$ which obviously signify the end of
2
2936
by: Kyote | last post by:
I used to use Code Snippet Editor back when I was working on VB. I loved it. I ended up getting away from programming for a while. Now that I'm starting to dabble again I'd like to use a snippet program to help me store blocks of code I'll use frequently. The problem is Code Snippet Editor, even the new one, doesn't seem to work on my Win XP Pro 64bit system. I even tried Snipp Dogg and it doesn't seem to work quite right either. What...
6
1640
by: virtualweb | last post by:
Hi all. I am a self-taught beginner Perl programmer. Run into this snippet of code which works as an Email List Cleaner. The script first checks the sintax of a list of emails saved in an input.txt file, then checks if those emails already exist in a sever file, lastly those emails which pass the first two test are verifyed whether they are true email boxes that exist in a remote server. I installed the Net::validMX module in my server and...
4
2190
by: tshad | last post by:
I was watching a video that used a code snippet to create a property and when you type "prop" tab tab, it would create the private variable as well as the property definitions with the private variable in it. When you changed the private variable it would also change the variables in the Property definition. But when I do it, I only get the property definition but no variables in it: public int MyProperty { get; set; }
0
879
by: tshad | last post by:
Is there a way to use code snippets to quickly add multiple properties? If you do on snippet for property, tabbing just goes around the fields. An escape will leave you where you last typed. Is there a way to have it put you after the snippet so you can type in the next snippet without having to mouse around to get to line following the snippet? Thanks,
0
8399
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8827
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8504
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8606
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7337
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6169
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4159
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4318
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2732
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.