TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
maffle
NA
14
0
try-and-catch
Nov 25 2006 5:14 AM
Visual Studio 2005, C# using command prompt when running the program
static
double
getQA()
{
try
{
double
qA =
Convert
.ToDouble(
Console
.ReadLine());
return
qA * 0.10;}
catch
{
Console
.WriteLine(
"Invalid Input!"
);}}
this at first works fine until i added the try-and-catch! it produces an error
'not all code paths return a value'. where's the problem?
-----------------------------------------------------------------------
and also, i want to ask how will i repeat the program for another user.
i ask like this.. Try Again? [Y/N]:
i dnt know what to do when the user presses yes.
im just new to C#. i study through tutorials but i can't find these things so i hope you understand
tnx in advance
Reply
Answers (
10
)
VB.NET to Active Directory (What am I missing here?)
Designer handbags wholesale