troubleshooting Question

assigning numerical value to strings to be added lator

Avatar of HawaiiDragon
HawaiiDragon asked on
C#
9 Comments1 Solution264 ViewsLast Modified:
okay so I have this program that is suposed to add up fees untill the user clicks submit at the bottom I am trying to store them in strings but I cant add them at the bottom. What I am trying to do is basically explained below.  After it runs through this though I cant add them up it does not recognize the strings... any ideas?
if (cbundergrad.Checked == true)
            {
                var standarddiploma = 75.00;

            }
            else
            {
                var standarddiploma = 0;
            }


            if (cbgrad.Checked == true)
            {
                var graddiploma = 125.00;

            }
            else
            {
                var graddiploma = 0;
            }

            if (cbseconddegree.Checked == true)
            {
                var seconddegree = 50.00;

            }

            else

            {
                var seconddegree = 0;
            }

            if (ddlAddCopy.SelectedValue == "Yes")
            {
                var addcopy1 =25.00;

            }

            else
            {
                var addcopy1 = 0;
            }

            if (ddlAddCopy0.SelectedValue == "Yes")
            {
                var addcopy2 = 25.00;
            }
            else

            {
                var addcopy2 = 0;
            
            }
ASKER CERTIFIED SOLUTION
Rick

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 9 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 9 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros