O'Reilly logo

C# in a Nutshell by Peter Drayton, Ted Neward, Ben Albahari

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Name

COMException

Synopsis

When a COM error occurs, .NET tries to map it to an exception in the .NET Framework, and throws that exception. If the COM error does not map to any exception in the .NET Framework, this exception is thrown instead. It’s the “couldn’t find an exception” exception.

public class COMException : ExternalException {
// Public Constructors
   public method COMException();  
   public method COMException(string message);  
   public method COMException(string message, 
        Exception inner);  
   public method COMException(string message, int errorCode);  
// Protected Constructors
   protected method COMException(
        System.Runtime.Serialization.SerializationInfo info, 
        System.Runtime.Serialization.StreamingContext context);  
// Public Instance Methods
   public override method string ToString();                     // overrides Exception
}

Hierarchy

System.ObjectSystem.Exception(System.Runtime.Serialization.ISerializable)System.SystemExceptionExternalExceptionCOMException

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required