form sorunu

Ahmet Süleyman
11-12-2011, 20:23   |  #1  
Ahmet Süleyman avatarı
OP Üye
Teşekkür Sayısı: 0
90 mesaj
Kayıt Tarihi:Kayıt: Eki 2011

arkadaşlar bir form uygulaması yaptım hesap makinesi yaptım kodları şu;
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 button1_Click(object sender, EventArgs e)
        {
            int a, b, c;
            a = Convert.ToInt32(textBox1.Text);
            b = Convert.ToInt32(textBox2.Text);
            c = a + b;
            textBox3.Text = (c + ToString());
        }

        private void button2_Click(object sender, EventArgs e)
        {int a,b,c;
            a = Convert.ToInt32(textBox1.Text);
            b = Convert.ToInt32(textBox2.Text);
            c = a*b;
            Convert.ToInt32(c);
            textBox3.Text = (c+ToString());

        }

        private void button3_Click(object sender, EventArgs e)
        {
            int a, b, c;
            a = Convert.ToInt32(textBox1.Text);
            b = Convert.ToInt32(textBox2.Text);
            c = a / b;
            textBox3.Text = (c + ToString());

        }

        private void button4_Click(object sender, EventArgs e)
        {
            int a, b, c;
            a = Convert.ToInt32(textBox1.Text);
            b = Convert.ToInt32(textBox2.Text);
            c = a - b;
            textBox3.Text = (c + ToString());
        }
    }
}

gelelim soruna sorunum herhangi bir işlem yaparken textBox3'e  WindowsFormsApplication1.Form1, Text: Form1 yazıyor bu sorunu nasıl çözebilirim

Kapalı Hesap (153535)
12-12-2011, 00:23   |  #2  
Kapalı Hesap
Teşekkür Sayısı: 27
2,297 mesaj
Kayıt Tarihi:Kayıt: Eki 2009

textBox3.Text=c.ToString() bu şekilde olmalı aldığın hata bu yüzden.+ operatörünü kullanamazsın.

Ahmet Süleyman
12-12-2011, 16:19   |  #3  
Ahmet Süleyman avatarı
OP Üye
Teşekkür Sayısı: 0
90 mesaj
Kayıt Tarihi:Kayıt: Eki 2011

çok sağolun

Kapalı Hesap (153535)
12-12-2011, 19:35   |  #4  
Kapalı Hesap
Teşekkür Sayısı: 27
2,297 mesaj
Kayıt Tarihi:Kayıt: Eki 2009

Önemli değil.