GPA Calulator - Converting Input to Value
I'm trying to code a GPA calculator in Visual Basic 08 for an independent enrichment and have everything set up and am pretty much done, except for the actual GPA calculation part. I have 8 combo boxes, one for each class, where the user can select their grade (A, A-, B+, etc). The part I'm stuck on is the conversion from a letter grade to the corresponding GPA, for example, A = 4.0, A- = 3.7.
I tried using an if statement:
string chineseGrade;
decimal chineseGPA;
if (chineseGrade("A"))
{
chineseGPA = 4.0;
}
but i keep getting the error that "chineseGrade is a variable but is being used as a method" and that "Literal of type double cannot be implicitly converted to type 'decimal'; use an 'M' suffix to create a literal of this type"
What can I do to solve these errors?
Answers (3)
0
hi,
you have to set the startup object. for set the start up object follow this step.
open solution explorer. select the solution or right click on solution and click on properties.
in property window set the startup object as your class name.
follow the screen.

2nd
