forum

Home / DeveloperSection / Forums / Exception message not working

Exception message not working

Takeshi Okada 1512 23-Dec-2013
public partial class Form1 : Form
{
    public Form1()
    {
        InitializeComponent();
    }
    private void button1_Click(object sender, EventArgs e)
    {
        try
        {
            string[] names = new string[2];
            string g = names[2];
        }
        catch(Exception error) {
            MessageBox.Show(error);
        }
    }
}

I don't know what’s wrong with it can’t seem to find the error. It would helpful if you could help me?

c# c# 
Updated on 23-Dec-2013

Can you answer this question?


Answer

1 Answers

Liked By