View Single Post
  #6 (permalink)  
Old January 24th, 2007, 12:08 AM
dparsons dparsons is offline
Wrox Author
Points: 13,255, Level: 49
Points: 13,255, Level: 49 Points: 13,255, Level: 49 Points: 13,255, Level: 49
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Oct 2005
Location: Ohio, USA
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
Send a message via AIM to dparsons
Default

Instead of this:
Console.ReadLine(charGrade);
char.Parse(charGrade);

You may want to try
charGrade = Console.ReadLine();

here is the problem I for see you having with your code. A char represents one character but, what happens if a user types in AB? Your code is going to throw an exception =\ I would suggest using a string unless you are going to write in error checking/handling so that if more then one char is passed in, you pass only one char to your variable.

================================================== =========
I will only tell you how to do it, not do it for you.
Unless, of course, you want to hire me to do work for you.
================================================== =========
Read this if you want to know how to get a correct reply for your question:
http://www.catb.org/~esr/faqs/smart-questions.html
^^Took that from planoie's profile^^
^^Modified text taken from gbianchi profile^^
================================================== =========
Reply With Quote