So here I am gona explain the problem: There are 3 textboxes, in two of them we should type some numbers to add and the third one should show the total of these two numbers.
error: cannot implicity convert type 'string' to 'double'
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 Detyra2
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
double nr1 = Convert.ToDouble(textBox1.Text);
double nr2 = Convert.ToDouble(textBox2.Text);
double nr3 = nr1 + nr2;
string shfaq = Convert.ToString(nr3);
textBox3.Text = shfaq;
}
}
}
I can't figure it out