Solved

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

Posted on 2006-11-11
2
161 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 250 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 250 total points
ID: 17923952
So in otherwords :)

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

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Web Form VB.Net  import CSV 4 44
write xml in vb.net 2 32
Help with consolidating excel files using VB.net 2 29
Vb.net threads keep increasing 2 35
The ECB site provides FX rates for major currencies since its inception in 1999 in the form of an XML feed. The files have the following format (reducted for brevity) (CODE) There are three files available HERE (http://www.ecb.europa.eu/stats/exch…
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.
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

856 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