Hi guys,
I need show an exception with a MessageBox but it take place in one project which mustn't use Form libraries. Maybe something like this.
Thank you in advance.
I need show an exception with a MessageBox but it take place in one project which mustn't use Form libraries. Maybe something like this.
Code:
public static void Main()
{
try
{
hallo(4);
}
catch (ArgumentOutOfRangeException ex)
{
MessageBox.Show(ex);
}
}
public static int hallo(int i)
{
int a;
try
{
int[] hola = {1, 2, 3};
a = hola[i];
}
catch (Exception ex){ throw ex; }
return a;
}
Comment