Ciao
> try
> {
>
> }
> catch (Exception e)
> {
> MessageBox.Show(e.Message);
> }
In quel modo ottieni il messaggio che descrive l'eccezione generata. Se hai bisogno di ottenere il nome dell'eccezione (quindi il nome della classe dell'eccezione generata) potresti fare così:
try
{
//...
}
catch (Exception ex)
{
MessageBox.Show(ex.GetType().Name);
}
Luca