Sakshi Kaul

Sakshi Kaul

  • NA
  • 72
  • 7.2k

How to handle null reference exception

Mar 18 2019 6:18 AM
I am getting the following exception 
namespace abc
{
public partial class Form1 : Form
{
SqlConnection conn;
Functions FS = new Functions();
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
FS.Connect();
toolStripStatusLabel1.Text = FS.Info[0].ToString()+" ("+FS.Info[1].ToString()+")";
}
private void packingSlipToolStripMenuItem_Click(object sender, EventArgs e)
{
PackingSlip PS = new PackingSlip();
PS.Show();
}
private void mastersToolStripMenuItem_Click(object sender, EventArgs e)
{
}
private void inwardToolStripMenuItem_Click(object sender, EventArgs e)
{
}
private void billWiseToolStripMenuItem_Click(object sender, EventArgs e)
{
}
}
}

Answers (8)