Is there anything like exception code? that i can know that on different languages operation system i can recognize the same exception?
I need to recognize ‘Acces to the COMn Port is denied’ and then do some action, is that possible? has this exception any specified type?
From the sounds of it you will be getting a
System.UnauthorizedAccessException(this assumption has been made from Googling the error message and finding this forum). To handle this, you would need to usecatchclauses in atry-catchstatement that are specific to this exception type. So, in C# you would do something like: