Currency Converter in C#

Download
Download is available until [expire_date]
  • Version
  • Download 46
  • File Size 255.20 KB
  • File Count 1
  • Create Date March 1, 2016
  • Last Updated March 1, 2016

Currency Converter in C#

Currency Converter in C#

A step by step tutorial on how to create a currency converter program in c#.
The file contains the source code and a pdf tutorial.

Sample code:

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace WindowsFormsApplication1
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void radioButton1_CheckedChanged(object sender, EventArgs e)
        {
            if (radioButton1.Checked == true)
            {
                label2.Text = "enter peso to dollar value";
                textBox2.Focus();
                
            }
        }

        private void radioButton2_CheckedChanged(object sender, EventArgs e)
        {
            if (radioButton2.Checked == true)
            {
                label2.Text = "enter euro to dollar value";
                textBox2.Focus();
            }
        }

        private void radioButton3_CheckedChanged(object sender, EventArgs e)
        {
            if (radioButton3.Checked == true)
            {
                label2.Text = "enter rupee to dollar value";
                textBox2.Focus();
            }
        }

        private void button1_Click(object sender, EventArgs e)
        {
            if (radioButton1.Checked == true)
            {
                MessageBox.Show("PHP " + (double.Parse(textBox1.Text) * double.Parse(textBox2.Text)));
            }
            else if (radioButton2.Checked == true)
            {
                MessageBox.Show("Euro " + (double.Parse(textBox1.Text) * double.Parse(textBox2.Text)));
            }
            else if (radioButton3.Checked == true)
            {
                MessageBox.Show("Rupee " + (double.Parse(textBox1.Text) * double.Parse(textBox2.Text)));
            }
        }

        private void Form1_Load(object sender, EventArgs e)
        {

        }
    }
}
, , , , ,

Post navigation

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.