using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace Testapp
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
EBBill x = new EBBill();
x.Rent = double.Parse(textBox4.Text);
x.calcBill();
}
partial class EBBill:Form1
{
string ownerName;
double unit;
public double Rent
{
get;
set;
}
public void calcBill()
{
double tot;
unit = double.Parse(textBox3.Text);
ownerName = textBox1.Text;
tot = unit * Rent;
label6.Text = Convert.ToString(tot);
label7.Text = ownerName;
}
}
}
}
Ниже приведен мой код.Может кто-нибудь сказать мне, что с ним не так?
Я продолжаю получать эту ошибку UnhandledException во время выполнения, которая, кажется, не имеет смысла для меня.
Изображение прилагается для справки. UnhandledException