|
Конвертер валюты на C#
Дали задание написать конвертер валюты. Проблема в том, что C# вспоминается с трудом.
Суть проблемы в том, что не удается перевести(или не знаю как) значение вводимое в textBox в формат для расчета. И вывод результата в другой textBox. Выдает ошибку
Error 1 'System.Convert' does not contain a definition for 'textBox3'
Вот листинг моей программы:
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();
}
int a = 30;
int x;
int z;
private void Form1_Load(object sender, EventArgs e)
{
}
private void button2_Click(object sender, EventArgs e)
{
Close();
}
private void radioButton1_CheckedChanged(object sender, EventArgs e)
{
}
private void button1_Click(object sender, EventArgs e)
{
{
if (radioButton1.Checked==true)
x = Convert.textBox3.ToInt32;
z = a * x;
textBox1.Text = Convert.ToString(z);
}
}
}
}
|