?
Solved

i have a converted c code to vb.net and its giving me problems

Posted on 2006-11-11
2
Medium Priority
?
166 Views
Last Modified: 2010-04-23
   'Public  Sub Exit()
    '        System.Console.WriteLine("Exiting...")
    '        System.Environment.Exit(0)
    '    End Sub

says exit is not valid or something...this is in a modual
how do i fix this???
0
Comment
Question by:Johnny
2 Comments
 
LVL 13

Accepted Solution

by:
iHadi earned 1000 total points
ID: 17923951
Hi  Pern
Exit is a keyword used by VB.NET, so it's reserved. you cannot name any method of yours Exit. If you do so the compiler will get confused which method should it execute, the builtin one or your Exit method. Try naming your method to something else like MyExit or CustomExit.
0
 
LVL 4

Assisted Solution

by:darkpriest
darkpriest earned 1000 total points
ID: 17923952
So in otherwords :)

'Public  Sub ExitMySub()
    '        System.Console.WriteLine("Exiting...")
    '        System.Environment.Exit(0)
    '    End Sub
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you're writing a .NET application to connect to an Access .mdb database and use pre-existing queries that require parameters, you've come to the right place! Let's say the pre-existing query(qryCust) in Access takes a Date as a parameter and l…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…
As many of you are aware about Scanpst.exe utility which is owned by Microsoft itself to repair inaccessible or damaged PST files, but the question is do you really think Scanpst.exe is capable to repair all sorts of PST related corruption issues?
Suggested Courses
Course of the Month13 days, 16 hours left to enroll

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question