Solved

How do I create a simple benefits calculator in C# using visual studio 2008

Posted on 2010-09-19
3
360 Views
Last Modified: 2013-12-16
I'm using visual studio 2008 and wanting to create a basic wage and benefit calculator.
my form design will be:
Enter your name: output "txtenteryourname"
Earnings: output "txtearnings"
Interval: group with three radio buttons . hourly, weekly, montly:

Monlhly Deductions: with two labels health and 401k output for both txthealth and txt401k

I must calculate on montly deductions no matter the interval selected

display any error messaage
display taxable income let say 0.6D
concatenate the same along with the results
result displayed at bottom of form

I just need a point in the right direction...thanks
0
Comment
Question by:Want2beAcodebuster
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 86

Accepted Solution

by:
Mike Tomlinson earned 250 total points
ID: 33713820
Use Decimal.TryParse() to convert the String entered by the user into a decimal value that you can perform calculations on:
http://msdn.microsoft.com/en-us/library/9zbda557.aspx

    string value = txtenteryourname.Text;
    decimal earnings;

    if (Decimal.TryParse(value, out earnings))
    {
        // perform a calculation with "earnings"
    }
    else
    {
        MessageBox.Show("Invalid earnings: " + value);  
    }
0
 

Author Closing Comment

by:Want2beAcodebuster
ID: 33859696
I was able to part of this solution
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
Examines three attack vectors, specifically, the different types of malware used in malicious attacks, web application attacks, and finally, network based attacks.  Concludes by examining the means of securing and protecting critical systems and inf…
Video by: Grant
The goal of this video is to provide viewers with basic examples to understand and use nested-loops in the C programming language.
The goal of this video is to provide viewers with basic examples to understand and use conditional statements in the C programming language.

726 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