Solved

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

Posted on 2010-09-19
3
322 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
3 Comments
 
LVL 85

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

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

The object model of .Net can be overwhelming at times – so overwhelming that quite trivial tasks often take hours of research. In this case, the task at hand was to populate the datagrid from SQL Server database in Visual Studio 2008 Windows applica…
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 recursion 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.

757 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now