System. InvalidCastException: "Не удалось привести тип объекта "System. Windows. Forms. TextBox" к типу "System. IConvertible"."
Код:
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 Jojo
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
int n = Convert. ToInt32(textBox1);
if (n % 2 == 0)
{
label3.Text = "Yes";
}
else
{
label3.Text = "No";
}
}
}
}
Другие вопросы по: Информатика
Знаешь правильный ответ?
System. InvalidCastException: "Не удалось привести тип объекта "System. Windows. Forms. TextBox" к т...
Популярные вопросы