I have an exception that says this:
System.NullReferenceException
when adding an item to a combobox with this code:
namespace Veterinari
{
public partial class Diagnostico : Form
{
int tipo;
public Diagnostico()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
Principal prin = new Principal(tipo);
prin.Show();
this.Hide();
}
private void button2_Click(object sender, EventArgs e)
{
Principal prin = new Principal(tipo);
prin.Show();
this.Hide();
}
}
}