Solved

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

Posted on 2006-11-11
2
160 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

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

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

This article explains how to create and use a custom WaterMark textbox class.  The custom WaterMark textbox class allows you to set the WaterMark Background Color and WaterMark text at design time.   IMAGE OF WATERMARKS STEPS Create VB …
Parsing a CSV file is a task that we are confronted with regularly, and although there are a vast number of means to do this, as a newbie, the field can be confusing and the tools can seem complex. A simple solution to parsing a customized CSV fi…
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

786 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