Solved

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

Posted on 2010-09-19
3
355 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
 
LVL 29

Expert Comment

by:Kumaraswamy R
ID: 33714940
0
 

Author Closing Comment

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

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

This article describes relatively difficult and non-obvious issues that are likely to arise when creating COM class in Visual Studio and deploying it by professional MSI-authoring tools. It is assumed that the reader is already familiar with the cla…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
The goal of this video is to provide viewers with basic examples to understand how to use strings and some functions related to them in the C programming language.
The goal of this video is to provide viewers with basic examples to understand how to create, access, and change arrays in the C programming language.

733 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