Categories > Coding > C# >

How to catch all exceptions

MINISHXP

[REDACTED]

Posts: 976

Threads: 3

Joined: Jan, 2021

Reputation: 9

Replied

@Bot

if Im right just doing catch(Exception) (yes just there is the type for that)

so really just:

btw my 'p' key broke on my keyboard so i have to cot and aste

try
{
     Console.WriteLine("bruh" - 1); //not sure if vs dec
}
catch (Exception) 
{
    MessageBox.Show("poopcode detected");
}
  • 0

Prev

Users viewing this thread:

( Members: 0, Guests: 1, Total: 1 )