TextBox txtSayi = new TextBox(); Button btnHesapla = new Button(); Label lblYazi = new Label(); this.Controls.Add(btnHesapla); this.Controls.Add(txtSayi); this.Controls.Add(lblYazi); txtSayi.Location = new Point(100, 150); lblYazi.Location = new Point(100, 100); btnHesapla.Text = "HESAPLA"; btnHesapla.Location = new Point(100, 200); btnHesapla.Size = new Size(20, 20); btnHesapla.Width = 150; btnHesapla.Height = 50; btnHesapla.FlatStyle = FlatStyle.Flat; btnHesapla.Click += new EventHandler(btnHesapla_Click);
void btnHesapla_Click(object sender, EventArgs e) { int deg = Convert.ToInt32(txtSayi);gives me an error here int yuzler, onlar, birler; string yuzz, onn, birr; yuzler = (((deg) / 100) * 100); yuzz = cevir(yuzler); onlar = (((deg) / 10) * 10) - yuzler; onn = cevir(onlar); birler = ((deg) % 10); birr = cevir(birler); lblYazi = yuzz + " " + onn + " " + birr; }
int deg = Convert.ToInt32(txtSayi);
Convert.ToInt32(txtSayi.Text);
int deg = Convert.ToInt32(txtSayi);gives me an error here
int deg = Convert.ToInt32(txtSayi.Text);
TryParse()
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)